Once upon a time, the pytest document now at https://docs.pytest.org/en/latest/goodpractices.html used to say:
avoid “
__init__.py” files in your test directories. This way your tests can run easily against an installed version ofmypkg, independently from the installed package if it contains the tests or not.
I don't understand following about that quote:
- What does it mean by installed version of
mypkg? How can I relate installing an app if I have a simple flask app that only says "hello world" when you hit the root at the localhost? - How is installed version different from installed package?
- What does it mean "if it contains tests or not"? Is it related to test discovery?
- Can someone practically explain how not having
__init__.pyis good?