I have recently started working on a project and have been tasked with implementing some new features as well as unit testing for those features. I have been trying to import modules into the unit testing file but when I run it I come across an ImportError: No module named Developing.algorithms when I try to import into test_algorithms.py
I have tried importing with both
from Developing import algorithms as algo
and
import Developing.algorithms as algo
My structure is similar to this Testing project that I made:
Testing/
__init__.py
Developing/
__init__.py
algorithms.py
Master (Stable)/
Tests/
__init__.py
test_algorithms.py
And I run into:
ImportError: No module named Developing.algorithms
Or when I change the import to: from Developing import algorithms
ImportError: No module named Developing
I have read many similar questions and from those I have learned to include init.py files into each directory that has a file that I want to import. I currently do not have any errors according to PyCharm but when I run it from terminal I run into that import error. I also do not want to modify the system / python path as I read that everyone that uses the project would have to so the same. So how can I import from parallel directories without changing paths?