Skip to content

Commit

Permalink
test: it could be useful to disable branch coverage in this helper
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Feb 8, 2025
1 parent f85d9b7 commit f473b87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/coveragetest.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def check_coverage(
partials: Iterable[str] = (),
branchz: str | None = None,
branchz_missing: str | None = None,
branch: bool = True,
) -> Coverage:
"""Check the coverage measurement of `text`.
Expand Down Expand Up @@ -184,7 +185,7 @@ def check_coverage(
branches_missing = arcz_to_arcs(branchz_missing)

# Start up coverage.py.
cov = coverage.Coverage(branch=True)
cov = coverage.Coverage(branch=branch)
cov.erase()
for exc in excludes or []:
cov.exclude(exc)
Expand Down

0 comments on commit f473b87

Please # to comment.