Open marcinbarczynski opened 2 years ago
does it by chance resolve if __init__.py
files are added into app
and app/tests
ah, forget that
the issue is that with the conftest the global app folder is added as first location to look after
so the name changes to app.tests.app.testapp
for the details i have to look up code
Hi @RonnyPfannschmidt @marcinbarczynski how's it going? This issue could be related to the Requiring/Loading plugins in a test module or conftest file Note section?. It says: _Requiring plugins using pytestplugins variable in non-root conftest.py files is deprecated.
_This is important because conftest.py files implement per-directory hook implementations, but once a plugin is imported, it will affect the entire directory tree. In order to avoid confusion, defining pytestplugins in any conftest.py file which is not located in the tests root directory is deprecated, and will raise a warning.
In the example provided conftest.py
is out of tests
directory.
Nope, diff issue with import path handling
Ok, I will work on this issue.
Minimal example: after adding
app.tests.foo
topytest_plugins
inconftest.py
, collecting tests fails:Without
pytest_plugins = ["app.tests.foo"]
everything works fine.