Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use coverage instead of pytest-cov #2645

Closed
jakkdl opened this issue May 17, 2023 · 1 comment · Fixed by #2665
Closed

use coverage instead of pytest-cov #2645

jakkdl opened this issue May 17, 2023 · 1 comment · Fixed by #2665

Comments

@jakkdl
Copy link
Member

jakkdl commented May 17, 2023

#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.

@jakkdl
Copy link
Member Author

jakkdl commented May 30, 2023

@A5rocks since you played around with the coverage, could you implement this as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant