I am trying to base my project structure on this answer. According to the answerer, all I need to do is structure my application like this:
project-name
project_name
__init__.py
some_module.py
some_other_module.py
tests
__init__.py
test_some_module.py
test_some_other_module.py
However, running python3.5 -m unittest discover
results in this error:
ImportError: No module named project_name
.
My __init__.py
files are empty as I understood that would make python think everything was a package. I understand there is a way to do it using PYTHONPATH but I had also understood that there was no need to use PYTHONPATH if you followed this package system.
What am I doing wrong? Is there an easy fix, or do I need to use a different structure or system to run tests?