From a99f726855622012c38a9677edae71c9c6110efe Mon Sep 17 00:00:00 2001 From: Claudio Jolowicz Date: Sat, 27 Nov 2021 07:06:45 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20[nox]=20Combine=20coverage=20und?= =?UTF-8?q?er=20the=20latest=20Python=20release=20(#710)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 59e34310..ea65e25a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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"]