This is my folder structure:
src/
__init__py
Lowlevel/
__init__.py
ModuleToCheck.Py
Test/
__init__.py
ModuleToCheck_test.py
(__init__.py
are empty files)
Now I want to import ModuleToCheck.py
in ModuleToCheck_test.py
How am I able to do this without appending anything to sys.path
?
Update:
from ..Lowlevel import ModuleToCheck
leads to:
src$ python Test/ModuleToCheck_test.py
Traceback (most recent call last):
File "Test/ModuleToCheck_test.py", line 6, in <module>
from ..Lowlevel import ModuleToCheck
ValueError: Attempted relative import in non-package