Open
Description
When I run the commands below (as per tutorial instructions)
$ cd user_manager
$ poetry run pytest tests/test_user_manager.py -v -s
and
$ poetry run pytest tests/mocking/test_user_manager_mocked.py -v -s
I get an ImportError:
ImportError while loading conftest '/home/user/LearningFlask/pytest-flask-sqlalchemy-example/user_manager/tests/conftest.py'.
tests/conftest.py:6: in <module>
from user_manager.app import create_app
E ModuleNotFoundError: No module named 'user_manager'
There are a couple of ways to fix this issue with imports, but it requires quite significant rearrangements. So I live it to you. 😊
One of the implementation option is as follows: https://github.com/alv2017/pytest-flask-sqlalchemy-example/tree/fixing-import-issue
Metadata
Metadata
Assignees
Labels
No labels