Skip to content

m4tice/python-login-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-authentication-template

A web authentication template using python and Flask

Error documentation

1. ModuleNotFoundError when executing pytest
Error message
ModuleNotFoundError: No module named 'app'  
Action
pytest -vv  
Solution

Execute

python -m pytest
Explanation
  • 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

Ref.: Py.test No module named *

About

A web login template using python and Flask

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published