You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pytest doesn't seem to work with implicit namespaces in your source, as defined by PEP 420. This still occurs as of pytest 5.0.1 installed in a Python 3 environment.
Note this is for the source package being tested, and I've encountered the issue with tests outside of the source package (init.py files are required for tests as noted in the best practices document.
E.g.
mypkg/
foo/
baz.py
bar/
baz.py
tests/
will yield errors like
./../../.local/lib/python3.6/site-packages/py/_path/local.py:721: in pyimport
raise self.ImportMismatchError(modname, modfile, self)
E py._path.local.LocalPath.ImportMismatchError: ('baz', '/home/vsts/work/1/s/mkpkg/foo/baz.py', local('/home/vsts/work/1/s/mkpkg/bar/mkpkg.py'))
Pytest doesn't seem to work with implicit namespaces in your source, as defined by PEP 420. This still occurs as of pytest 5.0.1 installed in a Python 3 environment.
Note this is for the source package being tested, and I've encountered the issue with tests outside of the source package (init.py files are required for tests as noted in the best practices document.
E.g.
will yield errors like
This issue has appeared in #774.
The text was updated successfully, but these errors were encountered: