move tests alongside code modules?
7yl4r opened this issue · comments
Tylar commented
This is a matter of preference, but I prefer to have the test code in the same directories as the module code. Would it be okay with everyone to move the tests alongside the code instead of in a /test/
directory? Here is a demonstration of the options:
- tests separate
. ├── /pyobis/ │ ├── occurrences │ │ └── occurrences.py │ ├── obisutils.py └── tests ├── test_occurrence.py └── test_obisutils.py
- tests alongside
. ├── /pyobis/ ├── occurrences │ ├── occurrences.py │ └── occurrences_test.py ├── obisutils.py └── obisutils_test.py
I prefer (2). What do ya'll think?
Filipe commented
I don't have a strong preference. Usually, for compiled code, I do prefer open (2)*. For non-compiled code I OK with both (1) or (2).
* IMO compiled code must ship the tests with the code so it can be tested in the end user machine. Option (2) makes that easier.