run --append doesn't create coverage file

Issue #392 resolved
Mattijs Ugen created an issue

We're using something like coverage run --append --source module_name py.test tests-folder/ to run unit tests with coverage. For multi-python support, this line is run with both python2.7 and python3.4 from tox. Tox makes sure COVERAGE_FILE is set to a location that suits our build env.

This has worked great for a while, but today our versionless dependency on coverage broke this, complaining with the following error twice (for both used python versions):

Couldn't combine from non-existent path 'coverage/file'

The folder exists (file name is fictional), 3.x created the file if it didn't exist, 4.0 breaks when it doesn't. Touching the file beforehand doesn't help; an empty file is an invalid coverage data file.

Command coverage html subsequently fails because there's no data to report.

I'm not too familiar with the current issues and sources for, it could have something to do with #220, but I can't currently find an issue that is identical to our problem right now :)

Comments (4)

  1. Mattijs Ugen reporter

    Took some effort to insert the current master into our build, but I can confirm this fixes our issue; thank you sir :)

  2. Log in to comment