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?
The developers should write unit tests alongside the source code and execute them in pipelines. Separating the repositories keeps more clean environment.
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
I prefer to keep them in a seperate directory, usually called either "unittests" or just "tests". I then play games in the Makefile to have to automatically handle this directory, if it exists.
It's a little bit of a pain to set up, but I personally prefer not to have the unit tests cluttering up the functional code. This way they are "close" enough to be obvious, but not in your face all the time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With