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

coverage combine when not in parallel mode wipes .coverage information (regression from 4.1) #525

Closed
nedbat opened this issue Oct 5, 2016 · 4 comments
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Oct 5, 2016

Originally reported by Anthony Sottile (Bitbucket: asottile, GitHub: asottile)


Not sure if this intentionally or accidentally regressed. Prior to 4.2, running coverage combine was a noop if the coverage was already combined. Now it wipes the data.

Simple reproduction

echo 'x = 5' > test.py
coverage run test.py
coverage report --include test.py
coverage combine
coverage report --include test.py

4.1

$ echo 'x = 5' > test.py
$ coverage run test.py
$ coverage report --include test.py
Name      Stmts   Miss  Cover
-----------------------------
test.py       1      0   100%
$ coverage combine
$ coverage report --include test.py
Name      Stmts   Miss  Cover
-----------------------------
test.py       1      0   100%

4.2

$ echo 'x = 5' > test.py
$ coverage run test.py
$ coverage report --include test.py
Name      Stmts   Miss  Cover
-----------------------------
test.py       1      0   100%
$ coverage combine
$ coverage report --include test.py
Name    Stmts   Miss  Cover
---------------------------
No data to report.

@nedbat
Copy link
Owner Author

nedbat commented Oct 5, 2016

Yes, this was a regression. It's already fixed on the tip.

@nedbat
Copy link
Owner Author

nedbat commented Oct 5, 2016

Fixed in 34ae57c51cfb3b2cd76725acc92aaed57bad1e79 (bb) (two months ago, yikes, I should release it!)

@nedbat
Copy link
Owner Author

nedbat commented Oct 5, 2016

Original comment by Anthony Sottile (Bitbucket: asottile, GitHub: asottile)


Neat, thanks again @nedbat!

@nedbat
Copy link
Owner Author

nedbat commented Dec 27, 2016

This fix was released as part of Coverage.py 4.3.

@nedbat nedbat closed this as completed Dec 27, 2016
@nedbat nedbat added major bug Something isn't working labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant