August 2018
Beginner
160 pages
4h 8m
English
An alternative to the method above is to organize your tests in a separate directory from the main package:
setup.pymylib/ __init__.py core.py utils.pytests/ __init__.py test_core.py test_utils.py
Some people prefer this layout because:
One disadvantage of the above method is that, once you have a more complex hierarchy, you will probably want to keep the same hierarchy inside your tests directory, and that's a little harder to maintain and keep in sync:
mylib/ __init__.py core/ __init__.py foundation.py contrib/ __init__.py text_plugin.pytests/ __init__.py core/ __init__.py test_foundation.py contrib/ ...
Read now
Unlock full access