question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression in 2.6.0: running coverage combine after pytest-cov now errors out

See original GitHub issue

We run coverage in parallel=True mode, because we have some tests that spawn subprocesses, and we want to capture coverage for all of them. To get a complete report for codecov, the CI does:

pytest --cov ...
coverage combine
bash <(curl -s https://codecov.io/bash)

As far as I know, this was mandatory on pytest-cov 2.5.1 and earlier. Since 2.6.0 came out yesterday, our tests have been failing because coverage combine says No data to combine and it errors out, failing the test suite.

I think this may be happening because pytest-cov is now effectively running coverage combine itself, so that instead of being mandatory to run coverage combine, it’s now mandatory to not to run coverage combine? Possibly because of changes in #178? For now that seems to be working for us. But it’d be nice to confirm that our understanding is correct, and I figured you’d rather have a heads-up than not.

Our bug: https://github.com/python-trio/trio/issues/646

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
cjw296commented, Jan 18, 2020

This auto-combine is problematic when you have several runs of pytest (say across different versions of python) and want to combine them. Please at least add an option to prevent pytest-cov doing this combining.

0reactions
cjw296commented, Sep 29, 2020

Some that that could be put in .coveragerc or pytest.ini would be ideal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pytest-cov - Read the Docs
This plugin produces coverage reports. Compared to just using coverage run this plugin does some extras: • Subprocess support: you can fork ...
Read more >
Release 2.6.0 - Pytest-Cov
This plugin produces coverage reports. Compared to just using coverage run this plugin does some extras: • Subprocess support: you can fork ...
Read more >
pytest-cov - PyPI
Coverage Data File. The data file is erased at the beginning of testing to ensure clean data for each test run. If you...
Read more >
How to use code coverage in Python with pytest?
Of course, tests are not enough to catch all kinds of errors, but in this uneven battle, we need all the help we...
Read more >
pytest-cov Changelog - pyup.io
Only works with coverage 6.3+. Contributed by Christian Fetzer in `536 <https://github.com/pytest-dev/pytest-cov/issues/536>`_. * Modernized pytest hook ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found