Description
By default, coverage only reports which lines were executed during unit testing. By enabling branch coverage, we can also see whether if-statements are tested for both True and False conditions.
To enable this, simply add the following to pyproject.toml
:
[tool.coverage.run]
branch = true
https://app.codecov.io/gh/microsoft/torchgeo/pull/2276/indirect-changes gives an idea of places where this coverage is missing. The real work involves adding new tests to add the missing coverage.
Reference: https://coverage.readthedocs.io/en/latest/branch.html