I have an issue related a module imports.
For example, I have the following file structure:
main_folder -> src -> main.py and logic.py
main_folder -> test -> tests_logic.py
The tests is for pytest file, I’m importing the other 2 files to the test, using for example:
from main_file.src.main import something
from main_file.src.logic import something
The issue is that every time I run the test file, the error ModuleNotFoundError: No module named
appears, even with the right imports for the modules in the test file.
How can I solve this?
I tried to refactor the repo, setup environment. The only thing that works is if I put all the .py files in the same directory, without subfolders.