In pytest-trio, we include the tests inside the package, in a pytest_trio/_tests/ subpackage.
(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 pytester plugin in its test suite. So, at the top of our test suite in pytest_trio/_tests/conftest.py, we have:
pytest_plugins = ["pytester"]
Recently, pytest has started issuing a warning here:
/home/njs/pytest-trio/pytest_trio/_tests/conftest.py:0: RemovedInPytest4Warning: Defining pytest_plugins in a non-top-level conftest is deprecated, because it affects the entire directory tree in a non-explicit way.
Please move it to the top level conftest file instead.
But... this file is already at the top of my test suite. Where am I supposed to put it instead?
In pytest-trio, we include the tests inside the package, in a
pytest_trio/_tests/subpackage.(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
pytesterplugin in its test suite. So, at the top of our test suite inpytest_trio/_tests/conftest.py, we have: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?