Behavior changed when .coveragerc is missing

Issue #357 resolved
Ned Batchelder repo owner created an issue

Suppose you have no .coveragerc file.

In v3.7, if you constructed a coverage object like this: coverage(config_file=".coveragerc"), it would be OK with the file not existing.

In 4.0a4, if you construct a coverage object that way, it will raise an exception: CoverageException: Couldn't read '.coveragerc' as a config file. Constructing it with coverage(config_file=True) will work the same in both versions: it will be fine with the file not existing.

The nose-cov plugin uses cov_core, which always supplies a config_file option.

Should it always be OK for the specified config file to be missing? If the user uses coverage run --rcfile=xyzzy.ini, shouldn't it complain if that file doesn't exist?

Comments (1)

  1. Log in to comment