Created virtual env and installed all the dependencies from requirements.txt
file. Now when I’m trying to run initial tests as - pytest -m LAB_UNIT_TEST_NAME
, I’m getting error -
Traceback (most recent call last):
File "/Users/aniruddhabarapatre1/anaconda/lib/python3.5/site-packages/_pytest/config.py", line 325, in _getconftestmodules
return self._path2confmods[path]
KeyError: local('/Users/aniruddhabarapatre1/Learn/MongoDB/M220/mflix-python/tests')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/aniruddhabarapatre1/anaconda/lib/python3.5/site-packages/_pytest/config.py", line 356, in _importconftest
return self._conftestpath2mod[conftestpath]
KeyError: local('/Users/aniruddhabarapatre1/Learn/MongoDB/M220/mflix-python/tests/conftest.py')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/aniruddhabarapatre1/anaconda/lib/python3.5/site-packages/_pytest/config.py", line 362, in _importconftest
mod = conftestpath.pyimport()
File "/Users/aniruddhabarapatre1/anaconda/lib/python3.5/site-packages/py/_path/local.py", line 662, in pyimport
__import__(modname)
File "/Users/aniruddhabarapatre1/anaconda/lib/python3.5/site-packages/_pytest/assertion/rewrite.py", line 216, in load_module
py.builtin.exec_(co, mod.__dict__)
File "/Users/aniruddhabarapatre1/Learn/MongoDB/M220/mflix-python/tests/conftest.py", line 2, in <module>
from mflix.factory import create_app
File "/Users/aniruddhabarapatre1/Learn/MongoDB/M220/mflix-python/mflix/factory.py", line 6, in <module>
from flask_bcrypt import Bcrypt
ImportError: No module named 'flask_bcrypt'
ERROR: could not load /Users/aniruddhabarapatre1/Learn/MongoDB/M220/mflix-python/tests/conftest.py
I reinstalled specific version without much help and also tried changing it to from flask.ext.bcrypt import Bcrypt
but it gives me same error.