I know there are probably thousands of posts like this and i nearly read them all and still i could not fix my issue.
I have the following project structure:
project
│
├── main.py
├── module1
│ ├── __init__.py
│ ├── b.py
│ └── c.py
│
├── tests
│ └── tests_module1.py
in tests_module1.py i want to import functions b.py and c.py to test their functionality. I already tried the following imports:
- from ..module1.b import *
- from module1.b import *
- from .. import b
I also tried adding init.py files to the project as well as the test folder with no succsess. It only works when i move the test_module1.py into the project folder and import with :
- from module1.b import *
I am using Python 3.9