pytest-dev / pytest-cov

Coverage plugin for pytest.
MIT License
1.72k stars 211 forks source link

Update tox example to properly track coverage #629

Closed jongbinjung closed 5 months ago

jongbinjung commented 6 months ago

If usedevelop=True is not set, coverage for tox tests show up as "0%" because tox runs the tests in a virtualenv. (See https://stackoverflow.com/questions/58696476/tox-0-coverage)

ionelmc commented 5 months ago

I have ran the src example locally and it still produces the expected 100% coverage - is there something I am missing here?

webknjaz commented 5 months ago

The Stackoverflow example seems to be missing the path mapping in the coveragepy config. This example shouldn't be updated. The patch is misleading.

jongbinjung commented 5 months ago

Ah, I see. Got it. Thanks for clarifying.