I am developing a collection of Python packages/modules (no executables). What is the correct/best way to set up the file hierarchy for testing. I can think of two scenarios:
Scenario 1:
AllPackages/
package1/
module1-1.py
module1-2.py
package2/
module2-1.py
module2-2.py
tests/
package1/
test_module1-1.py
test_module1-2.py
package2/
test_module2-1.py
test_module2-2.py
Scenario 2:
AllPackages/
package1/
module1-1.py
module1-2.py
tests/
test_module1-1.py
test_module1-2.py
package2/
module2-1.py
module2-2.py
tests/
test_module2-1.py
test_module2-2.py
I am new to unittesting (I know I should have done it long ago) so I'm not sure which of these approaches is better and I'm looking for some advice from those which have more experience.
Thanks!