Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
If I can't put pytest_plugins in my conftest.py, where do I put it? #4039
In pytest-trio, we include the tests inside the package, in a
(I know this is controversial in various ways, but according to the docs it is an officially supported configuration.)
Since pytest-trio is itself a pytest plugin, it wants to use the
pytest_plugins = ["pytester"]
Recently, pytest has started issuing a warning here:
But... this file is already at the top of my test suite. Where am I supposed to put it instead?
referenced this issue
Sep 26, 2018
we might want to drop the warning if the "toplevel" is inside a python package imported as python package from a actual import location
but part of that is correctly working with pyimport and figuring a sane path towards import and collection roots (because what we have right now is just
This might be a reasonable temporary workaround.