#2628 replaces trio/_tests/conftest.py and trio/_core/tests/conftest.py with a pytest plugin trio/_tests/pytest_plugin.py that's parsed on startup with -p. This means that the plugin, or anything it imports (i.e. trio.testing) does not get "seen" by pytest-cov, as that's loaded later.
https://stackoverflow.com/a/62224494 suggest using coverage -m pytest [...] instead of pytest --cov [...] to launch coverage before running pytest, which solves this. I started trying to fix it in 00fe706 but decided to postpone it for a separate PR.
#2628 replaces
trio/_tests/conftest.pyandtrio/_core/tests/conftest.pywith a pytest plugintrio/_tests/pytest_plugin.pythat's parsed on startup with-p. This means that the plugin, or anything it imports (i.e.trio.testing) does not get "seen" by pytest-cov, as that's loaded later.https://stackoverflow.com/a/62224494 suggest using
coverage -m pytest [...]instead ofpytest --cov [...]to launch coverage before running pytest, which solves this. I started trying to fix it in 00fe706 but decided to postpone it for a separate PR.