<div dir="ltr">IIUC another common layout is to have folders named test or tests inside each package. This would avoid requiring any changes to the site-packages layout.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 19, 2018 at 6:27 AM, Stefan Krah <span dir="ltr"><<a href="mailto:stefan@bytereef.org" target="_blank">stefan@bytereef.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hello,<br>
<br>
I wonder if we could get an official site-packages/test directory. Currently<br>
it seems to be problematic to distribute tests if they are outside the package<br>
directory. Here is a nice overview of the two main layout possibilities:<br>
<br>
<a href="http://pytest.readthedocs.io/en/reorganize-docs/new-docs/user/directory_structure.html" rel="noreferrer" target="_blank">http://pytest.readthedocs.io/<wbr>en/reorganize-docs/new-docs/<wbr>user/directory_structure.html</a><br>
<br>
<br>
I like the outside-the-package approach, mostly for reasons described very<br>
eloquently here:<br>
<br>
<a href="http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html" rel="noreferrer" target="_blank">http://python-notes.<wbr>curiousefficiency.org/en/<wbr>latest/python_concepts/import_<wbr>traps.html</a><br>
<br>
<br>
CPython itself of course also uses Lib/foo.py and Lib/test/test_foo.py, so it<br>
would make sense to have site-packages/foo.py and site-packages/test/test_foo.<wbr>py.<br>
<br>
For me, this is the natural layout.<br>
<br>
<br>
<br>
Stefan Krah<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>