I have the follow project structure
- app
- folder1
- folder2
- __init__.py
- classA.py
- folder3
- __init__.py
- classB.py
- tests
- __init__.py
- test_classA.py
- test_classB.py
classB.py
from folder2.classA import clsA
I running tests the follow command and it works
cd app\folder1
python -m unittest discover
aslo if in Pycharm I add the folder1 in source, and run classB.py it works, but in vsCode when I running classB.py I get an error
ModuleNotFoundError: No module named 'folder2'
how to add folder1 in vscode to source as in pycharm?
also I tried
from ..folder2.classA import clsA
and got
ImportError: attempted relative import with no known parent package
I trying to fix it a second day, but nothing work in vscode works only in pycharm