[TIP] PyTest test directory structure confusion
cappy2112 at gmail.com
Thu Aug 29 14:56:22 PDT 2019
Date: Wed, 28 Aug 2019 14:48:21 +0300
From: Marius Gedminas <marius at gedmin.as>
Subject: Re: [TIP] PyTest test directory structure confusion
To: testing-in-python at lists.idyll.org
Message-ID: <20190828114821.zo5dt4bmjxgcs6ss at blynas>
Content-Type: text/plain; charset="utf-8"
>>You have the simplest possible case: one code file, one test file. You
>>don't need a directory structure at this point, just the two files:
Even though I'm just now getting my head around testing with Pytest,
I've decided to put the tests in a separate directory called unit_tests,
which is at the same level as the directory containing the file being
I don't have any __init__.py in the test directory.
I don't know if my setup is optimal yet, but I'm able to run the tests I've
written and got reasonable results. Getting tests written and able to run
is a significant first step, even though there are still many questions in
The main thing is that I'm testing- finally.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python