Skip to content

🐞 Fix handling empty coverage #397

@ckunki

Description

@ckunki

Currently, the GitHub workflow report.yml fails with error message

CalledProcessError: Command '['coverage', 'json', '--data-file=.coverage', '-o', '/tmp/tmpbe4nkhye/coverage.json']' returned non-zero exit status 2.
nox > Session project:report failed.

See example.

Experiments showed that the stout of the command showed

No data to report.

In consequence, the command did not create a json file and the following commands trying to open and read the json file failed.

The current ticket therefore requests to change Function total_coverage() to

  • report the output of command coverage instead of hiding it
  • return total coverage of 100 % in case of an empty project with no lines to be covered.

Metadata

Metadata

Assignees

Labels

bugUnwanted / harmful behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions