Skip to content

Add branch coverage, improve overall coverage #356

@bollwyvl

Description

@bollwyvl

With #352, we now have a baseline established for code coverage under test.

Adding --cov-branch knocks down the effective coverage by a couple points, and reveals some places where multiple conditionals within a given function might affect each other.

Further, 66% isn't awe-inspiring, and it should be possible to substantially improve this value... and most likely find some new bugs along the way.

A powerful tool for confidently increasing coverage without adding many little tests is property-based testing, for which hypothesis is the really the only game in python-town. Property-based testing is very effective at finding lots of failing cases by trying lots of (crazy) cases, but crucially reduces a class of failures to a minimal example.

I'll take a look and see what I can find...

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