A web authentication template using python and Flask
ModuleNotFoundError: No module named 'app'
pytest -vv
Execute
python -m pytest
- Running pytest with the python -m pytest command helps with this exact thing.
- Since your current package is not yet in your $PYTHONPATH or sys.path - pytest gets this error.
- By using python -m pytest you automatically add the working directory into sys.path for running pytest. Their documentation also mentions:
This is almost equivalent to invoking the command line script pytest