How to get coverage reporting when testing a pytest plugin?

Instead of using the pytest-cov plugin, use coverage to run pytest:

coverage run -m pytest ....

That way, coverage will be started before pytest.

Leave a Comment