[pytest-dev] PEP420, Namespace Packages and Pytest Test Layout
mailing-list+pytest at alexandre.figura.live
Thu Aug 2 10:45:22 EDT 2018
I recently discovered that it was possible to import test modules from other test modules without having __init__.py files in my test directories. I thought it was impossible to do so with Pytest. And discovered it was possible because of the PEP420 and namespace packages <https://docs.pytest.org/en/latest/goodpractices.html?highlight=pep420#tests-as-part-of-application-code>.
However, I am wondering now if I should rely on the PEP420 to import test modules. I mean, is Pytest designed to be used in this way? Or should I avoid to rely on Python 3 behavior, and use a more "Pytestic" way of structuring my test modules?
Waiting for your feedback on this topic,
Have a nice day ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pytest-dev