Skip to content

Odd behavior reporting (unchanged) coverage levels #492

@ferdnyc

Description

@ferdnyc

Just noticed this on a recent PR run:


Coverage report

FileStatementsMissingCoverageCoverage
(new stmts)
  src/pydot
  classes.py
  core.py
  dot_parser.py
  test
  conftest.py
  test_classes.py
  test_pydot.py
Project Total

This report was generated by python-coverage-comment-action


...There were no code changes, so there were no coverage changes, of course. But why does test_pydot.py staying at 93% coverage get a green badge, while classes.py staying at 96% gets an orange badge? Something fishy there.

Possible it has something to do with the branch coverage, though I don't think so.

(Although, speaking of branch coverage, having it included does make those summaries a bit "off". For example, 384 ÷ 402 is actually 95.5%, not 93%. 93% is the correct coverage value, because missing branches lower the total coverage for the file... but it means that displaying both the percentages and the lines-of-coverage fractions is a bit confusing/misleading, since one doesn't directly correspond to the other.)

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