Skip to content

use coverage instead of pytest-cov #2645

Description

@jakkdl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions