Still getting ImportPathMismatchError
when using tox and fixtures conftest.py
#10109
Unanswered
astrojuanlu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am observing a weird situation that makes me question my pytest setup. So far my tests were working well, but today I decided to add some fixtures to
conftest.py
that actually import the library code, and started getting these errors when running tox:There are no
__init__.py
files under mytests
directory, but I acknowledge that maybe it's a weird interaction between tox, pytest, and pytest-doctestplus. The error disappears if I remove my library imports fromconftest.py
.This is probably similar to what @matthewfeickert observed in scikit-hep/pyhf#1467 and I solved it in the same way: removing
src
fromtestpaths
. I'm aware there's alsoPY_IGNORE_IMPORTMISMATCH=1
, but it feels kind of hacky.Basically, my question is: is this a bug? A feature? Am I doing anything wrong by removing
src
fromtestpaths
(like suddenly disabling doctests without noticing)? IsPY_IGNORE_IMPORTMISMATCH=1
the only way?Beta Was this translation helpful? Give feedback.
All reactions