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
In devpi-server are several fixtures which are reused in plugin tests. That isn't optimal, see devpi/devpi#780. Some other fixtures are currently reused by importing them from test_devpi_server.conftest, some other with pytest_devpi_server which is a plugin with an entry point. The direct importing also seems to be bad for various reasons.
After trying for some time I managed to get it working by using pytest_plugins = ["pytest_devpi_server", "test_devpi_server.conftest"] in the root conftest.py of devpi-web.
Problem is, it only works when using pytest directly, not when using tox. I tried to debug it and am stuck. The modules are reached, which is confirmed by both tox -e py37 -- --trace-config and sprinkling pdb.set_trace() in them. All relevant modules pytest_devpi_server, test_devpi_server.conftest, web/conftest.py and web/tests/conftest.py are reached and included in the trace. Still the fixtures from test_devpi_server.conftest are not found when running tox, but work fine when using pytest directly.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
In devpi-server are several fixtures which are reused in plugin tests. That isn't optimal, see devpi/devpi#780. Some other fixtures are currently reused by importing them from
test_devpi_server.conftest
, some other withpytest_devpi_server
which is a plugin with an entry point. The direct importing also seems to be bad for various reasons.After trying for some time I managed to get it working by using
pytest_plugins = ["pytest_devpi_server", "test_devpi_server.conftest"]
in the rootconftest.py
of devpi-web.Problem is, it only works when using
pytest
directly, not when usingtox
. I tried to debug it and am stuck. The modules are reached, which is confirmed by bothtox -e py37 -- --trace-config
and sprinklingpdb.set_trace()
in them. All relevant modulespytest_devpi_server
,test_devpi_server.conftest
,web/conftest.py
andweb/tests/conftest.py
are reached and included in the trace. Still the fixtures fromtest_devpi_server.conftest
are not found when running tox, but work fine when using pytest directly.Beta Was this translation helpful? Give feedback.
All reactions