Is there a consensus about the best place to put Python unittests?
Should the unittests be included within the same module as the functionality being tested (executed wh
I generally keep test code in a separate module, and ship the module/package and tests in a single distribution. If the user installs using setup.py
they can run the tests from the test directory to ensure that everything works in their environment, but only the module's code ends up under Lib/site-packages
.