branch coverage

A measurement of whether each decision in the code, such as an if statement, was taken both ways during the tests.

In more detail

Line coverage can report an if statement as covered even when only its true side ever ran. Branch coverage records which way each decision went, so it finds the path that was never taken. coverage.py measures it with the branch option.

Related terms

Taught in

References

Certification courses