diff --git a/noxfile.py b/noxfile.py index 66e4a19..0835925 100644 --- a/noxfile.py +++ b/noxfile.py @@ -97,7 +97,6 @@ def _coverage(session: nox.Session) -> None: "CIBUILDWHEEL": "1", "CFLAGS": "-O0 -coverage", "LDFLAGS": "-coverage", - "COVERAGE_PROCESS_START": "1", } update_env_macos(session, env) session.install("-e", ".", env=env) @@ -123,15 +122,16 @@ def _coverage(session: nox.Session) -> None: threshold = 100.0 if "CI" in os.environ else 99.8 session.run("coverage", "report", "--show-missing", f"--fail-under={threshold}") session.run("coverage", "xml", "-ocoverage-python.xml") - gcovr_config = ("-r=.", "-e=base64", "-e=.base64_build") - session.run( - "gcovr", - *gcovr_config, - "--fail-under-line=90", - "--txt", - "-s", - "--xml=coverage-native.xml", - ) + if sys.platform.startswith("linux"): + gcovr_config = ("-r=.", "-e=base64", "-e=.base64_build") + session.run( + "gcovr", + *gcovr_config, + "--fail-under-line=90", + "--txt", + "-s", + "--xml=coverage-native.xml", + ) @nox.session(venv_backend="none") diff --git a/pyproject.toml b/pyproject.toml index a9c6a4b..cdb6a79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ environment = { AUDITWHEEL_PLAT="manylinux_2_31_${AUDITWHEEL_ARCH}" } [tool.coverage.run] branch = true +patch = ["subprocess"] omit = [ "tests/conftest.py", "tests/test_benchmark.py", diff --git a/requirements-coverage.txt b/requirements-coverage.txt index 3d1983c..fae60b8 100644 --- a/requirements-coverage.txt +++ b/requirements-coverage.txt @@ -1,4 +1,4 @@ -r requirements-test.txt gcovr==8.4 -pytest-cov==6.3.0 +pytest-cov==7.0.0 coverage==7.10.7