Skip to content

run --append doesn't create coverage file #392

@nedbat

Description

@nedbat

Originally reported by Mattijs Ugen (Bitbucket: akaidiot, GitHub: akaidiot)


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), coverage.py 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 coverage.py, it could have something to do with #220, but I can't currently find an issue that is identical to our problem right now :)


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrun

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions