Skip to content

Commit

Permalink
👷 [nox] Combine coverage under the latest Python release (#710)
Browse files Browse the repository at this point in the history
Combine coverage data under the latest Python version supported by the measured
code. Combining data from Python 3.10 under Python 3.9 produces false positives
in branch coverage, where arcs leaving loop blocks are reported as missing.

Previously, the coverage session used the same Python interpreter as Nox. This
worked fine in CI, but could trigger the problem in local development, if Nox
was installed under an older interpreter such as Python 3.9.
  • Loading branch information
cjolowicz authored Nov 27, 2021
1 parent acec7f4 commit a99f726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def tests(session: Session) -> None:
session.notify("coverage", posargs=[])


@session
@session(python=python_versions[0])
def coverage(session: Session) -> None:
"""Produce the coverage report."""
args = session.posargs or ["report"]
Expand Down

0 comments on commit a99f726

Please sign in to comment.