I'm trying to write a test for my python program, and I've created a /tests
directory, where /
means the projects root, not system root.
I have all my source files in /myProjectName
.
Both directories have a __init__.py
file, but project root does not, and both files are empty (do I need a __init__.py
in the tests
directory ?)
I've tried importing /myProjectName/main.py
in /tests/test_main.py
, but it doesn't work.
What is the right way to either structure the project directories or import main.py
in test_main.py
?