nedbat / coveragepy

The code coverage tool for Python
https://coverage.readthedocs.io
Apache License 2.0
3.03k stars 435 forks source link

CoverageException: Can't add arcs to existing line data #476

Closed nedbat closed 8 years ago

nedbat commented 8 years ago

Originally reported by Anonymous


While testing with: coverage==4.0.3 django-nose==1.4.3

With arguments: '--cover-branches', '--with-coverage', '--cover-package=personalfinance.services',

I get:

File "pythonenv\lib\site-packages\coverage\data.py", line 363, in add_arcs raise CoverageException("Can't add arcs to existing line data") coverage.misc.CoverageException: Can't add arcs to existing line data


nedbat commented 8 years ago

Original comment by bouteillebleu (Bitbucket: bouteillebleu, GitHub: bouteillebleu)


Not the original raiser of the issue, but finding this was useful - I ran into the same error (having first done a run without --cover-branches), but putting --cover-erase into the command line as well made it run correctly. Thank you Ned for the note about cleaning existing data files before running coverage again.

nedbat commented 8 years ago

If you can provide more details, feel free to re-open this issue.

nedbat commented 8 years ago

Please be sure to clean existing data files before running coverage. Can you provide instructions on reproducing the problem?