Search code examples
pythonunit-testingcode-organization

Where to keep Python unit tests?


Possible Duplicate:
Where do the Python unit tests go?

Are unit tests kept in the same file as the code, a separate file in the same directory, or in an entirely different directory?


Solution

  • I always place my unit tests in a subdirectory to the related code called test.

    For example: /libs/authentication, the tests would be placed in /libs/authentication/tests