coverage 4.0 combines .coverage.xml

Issue #400 wontfix
Florian Bruhin
created an issue

In my testsuite, I have a .coveragerc to output a XML file to .coverage.xml.

Coverage 4.0 tries to combine that as it searches for .coverage.* and bails out:

[...]
  File "/home/florian/proj/qutebrowser/git/.tox/py34/lib/python3.4/site-packages/pytest_cov/engine.py", line 123, in finish
    self.cov.combine()
  File "/home/florian/proj/qutebrowser/git/.tox/py34/lib/python3.4/site-packages/coverage/control.py", line 781, in combine
    self.data_files.combine_parallel_data(self.data, aliases=aliases, data_paths=data_paths)
  File "/home/florian/proj/qutebrowser/git/.tox/py34/lib/python3.4/site-packages/coverage/data.py", line 648, in combine_parallel_data
    new_data.read_file(f)
  File "/home/florian/proj/qutebrowser/git/.tox/py34/lib/python3.4/site-packages/coverage/data.py", line 277, in read_file
    filename, exc.__class__.__name__, exc,
coverage.misc.CoverageException: Couldn't read data from '/home/florian/proj/qutebrowser/git/.coverage.xml': CoverageException: Doesn't seem to be a coverage.py data file

I think it should exclude the HTML/XML output files specified in .coveragerc from combination.

Comments (4)

  1. Ned Batchelder repo owner

    Coverage.py 4.0 is more vocal about files that it tried to read but cannot. v3.7.1 simply ignored all errors reading files, but still deleted the files.

    You should name your XML file something that doesn't look like a coverage.py data file. I'd rather not special-case the configured XML name.

  2. Log in to comment