Skip to content

Is it possible to tell why a coverage report can't be parsed? #185

Closed Answered by aconrad
BatmanAoD asked this question in Q&A
Discussion options

You must be logged in to vote

I see your point. Pycobertura will try to read the coverage report in two ways:

  • by treating the argument as an expected filename (most use cases when using the command line)
  • by treating the argument as an XML input, e.g. <xml>...</xml> (may be more common when using pycobertura as a library)

In your case, it's from the command line, so it's likely that pycobertura just couldn't find the file on disk.

Would an output like this one be more useful?

pycobertura.cobertura.Cobertura.InvalidCoverageReport: Invalid coverage file: goobar.xml. The following exceptions occurred while attempting to parse the report:
* While treating the report as a filename: Error reading file 'goobar.xml': failed …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@aconrad
Comment options

Answer selected by aconrad
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants