Skip to content

test suite fails with coverage 5.4 #452

Closed
@Chedi

Description

@Chedi

Summary

The new version of coverage (5.4) has implemented a new behavior where :

The text report produced by coverage report now always outputs a TOTAL line, even if only one Python file is reported. This makes regex parsing of the output easier. Thanks, Judson Neer. This had been requested a number of times (issue 1086, issue 922, issue 732).

https://github.com/nedbat/coveragepy/releases/tag/coverage-5.4

this causes some test expecting empty lines at the end of the coverage report to fail

Expected vs actual result

expected: passing tests
results: failing tests with the following assert

assert all(not line.startswith('TOTAL ') for line in result.stdout.lines[-4:])

Reproducer

Versions

pytest-cov: 2.11.1
coverage: 5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions