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

Running coverage combine twice deletes all coverage data #516

Closed
nedbat opened this issue Aug 4, 2016 · 2 comments
Closed

Running coverage combine twice deletes all coverage data #516

nedbat opened this issue Aug 4, 2016 · 2 comments
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Aug 4, 2016

Originally reported by John Vandenberg (Bitbucket: jayvdb, GitHub: jayvdb)


If combine is run twice, it replaces the coverage data with an empty coverage file, rather silently.

This can happen when two coverage related tools are used consecutively, and both think they are able to (and should) run coverage combine before analysing the coverage data. Both tools will execute without error, but the second tool be analysing empty coverage data.

On the first coverage combine run, the multiple partial coverage files are merged into one coverage file (and the partial coverage files removed)

On the second coverage combine run, there are no partial coverage files, so a single empty coverage file is created, as of v4.2.

This is a specific case of https://bitbucket.org/ned/coveragepy/issues/412/coverage-combine-should-error-if-no, and possibly also related to https://bitbucket.org/ned/coveragepy/issues/511/version-42-coverage-combine-empties .

If there are no .coverage.* files, there is nothing to combine, and it should cause an error.


@nedbat
Copy link
Owner Author

nedbat commented Aug 7, 2016

Fixed in 34ae57c51cfb (bb), it would be great if you could test it out for me.

@nedbat
Copy link
Owner Author

nedbat commented Dec 27, 2016

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

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