I responded via the notification email and obviously that didn’t go anywhere. What config file? I only see pyvenv.cfg:
home = /usr/bin
include-system-site-packages = true
version = 3.9.7
Looking at the error, it showed that the requests module was missing. I installed that, now I get this error:
(mflix) phil-envy:~/mongo_courses/mflix$ pytest -m projections
========================================================================= test session starts =========================================================================
platform linux -- Python 3.9.7, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: /home/pcrooker/mongo_courses/mflix, inifile: pytest.ini
plugins: flask-0.11.0
collected 0 items / 1 errors
=============================================================================== ERRORS ================================================================================
__________________________________________________________________________ ERROR collecting __________________________________________________________________________
lib/python3.9/site-packages/_pytest/config.py:327: in _getconftestmodules
return self._path2confmods[path]
E KeyError: local('/home/pcrooker/mongo_courses/mflix/lib/python3.9/site-packages/notebook/tests/selenium')
During handling of the above exception, another exception occurred:
lib/python3.9/site-packages/_pytest/config.py:358: in _importconftest
return self._conftestpath2mod[conftestpath]
E KeyError: local('/home/pcrooker/mongo_courses/mflix/lib/python3.9/site-packages/notebook/tests/selenium/conftest.py')
During handling of the above exception, another exception occurred:
lib/python3.9/site-packages/_pytest/config.py:364: in _importconftest
mod = conftestpath.pyimport()
lib/python3.9/site-packages/py/_path/local.py:701: in pyimport
__import__(modname)
lib/python3.9/site-packages/_pytest/assertion/rewrite.py:212: in load_module
py.builtin.exec_(co, mod.__dict__)
lib/python3.9/site-packages/notebook/tests/selenium/conftest.py:11: in <module>
from selenium.webdriver import Firefox, Remote, Chrome
E ModuleNotFoundError: No module named 'selenium'
During handling of the above exception, another exception occurred:
lib/python3.9/site-packages/py/_path/common.py:377: in visit
for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
lib/python3.9/site-packages/py/_path/common.py:429: in gen
for p in self.gen(subdir):
lib/python3.9/site-packages/py/_path/common.py:429: in gen
for p in self.gen(subdir):
lib/python3.9/site-packages/py/_path/common.py:429: in gen
for p in self.gen(subdir):
lib/python3.9/site-packages/py/_path/common.py:429: in gen
for p in self.gen(subdir):
lib/python3.9/site-packages/py/_path/common.py:429: in gen
for p in self.gen(subdir):
lib/python3.9/site-packages/py/_path/common.py:418: in gen
dirs = self.optsort([p for p in entries
lib/python3.9/site-packages/py/_path/common.py:419: in <listcomp>
if p.check(dir=1) and (rec is None or rec(p))])
lib/python3.9/site-packages/_pytest/main.py:723: in _recurse
ihook = self.gethookproxy(path)
lib/python3.9/site-packages/_pytest/main.py:627: in gethookproxy
my_conftestmodules = pm._getconftestmodules(fspath)
lib/python3.9/site-packages/_pytest/config.py:341: in _getconftestmodules
mod = self._importconftest(conftestpath)
lib/python3.9/site-packages/_pytest/config.py:366: in _importconftest
raise ConftestImportFailure(conftestpath, sys.exc_info())
E _pytest.config.ConftestImportFailure: ModuleNotFoundError("No module named 'selenium'")
E File "/home/pcrooker/mongo_courses/mflix/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 212, in load_module
E py.builtin.exec_(co, mod.__dict__)
E File "/home/pcrooker/mongo_courses/mflix/lib/python3.9/site-packages/notebook/tests/selenium/conftest.py", line 11, in <module>
E from selenium.webdriver import Firefox, Remote, Chrome
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================= 1 error in 1.16 seconds =======================================================================
(mflix) phil-envy:~/mongo_courses/mflix$
Are you sure these test scripts actually run at the command line? Thanks.