<div dir="ltr">Message: 2<br>Date: Wed, 28 Aug 2019 14:48:21 +0300<br>From: Marius Gedminas &lt;<a href="mailto:marius@gedmin.as" target="_blank">marius@gedmin.as</a>&gt;<br>Subject: Re: [TIP] <span class="gmail-il">PyTest</span> <span class="gmail-il">test</span> <span class="gmail-il">directory</span> <span class="gmail-il">structure</span> <span class="gmail-il">confusion</span><br>To: <a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><br>Message-ID: &lt;20190828114821.zo5dt4bmjxgcs6ss@blynas&gt;<br>Content-Type: text/plain; charset=&quot;utf-8&quot;<br><br>Thanks Marius<br><br>&gt;&gt;You have the simplest possible case: one code file, one <span class="gmail-il">test</span> file.  You<br>&gt;&gt;don&#39;t need a <span class="gmail-il">directory</span> <span class="gmail-il">structure</span> at this point, just the two files:<br><br>&gt;&gt;    mycode.py<br>&gt;&gt;    tests.py<div><br></div><div>Even though I&#39;m just now getting my head around testing with Pytest,</div><div>I&#39;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 tested.</div><div><br></div><div>I don&#39;t have any __init__.py in the test directory.</div><div><br></div><div>I don&#39;t know if my setup is optimal yet, but I&#39;m able to run the tests I&#39;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 my head.</div><div>The main thing is that I&#39;m testing- finally.</div><div><br></div><div>Thanks- all</div><div><br></div><div><br></div><div><br></div></div>