'module not found issue with pytest
I have a folder structure like this
- functions
- func1
- file.py
- app.py
- file1.py
- func2
- tests
- test1.py
I am calling app.py inside test1.py
def test_file_case():
from functions.func1.app import some_func
and app.py imports file and file1 which throws error when I run pytest -s test1.py or python -m pytest test1.py
from file import *
from file1 import *
def some_func():
somecode..
any suggestions what could be done to resolve the issue and I have __init__.py
files in all the directories.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|