From f5ff95ce814c27e9a8a2f17340e0bc4832424fe1 Mon Sep 17 00:00:00 2001 From: Lihua <1017343802@qq.com> Date: Thu, 1 Oct 2026 20:43:02 -0700 Subject: [PATCH] test(ci): exclude disposable probe checkout from coverage Signed-off-by: Lihua <1017343802@qq.com> --- tests/architecture/test_semantic_development_probe.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/architecture/test_semantic_development_probe.py b/tests/architecture/test_semantic_development_probe.py index 94987444c4..71d5f72f31 100644 --- a/tests/architecture/test_semantic_development_probe.py +++ b/tests/architecture/test_semantic_development_probe.py @@ -2,6 +2,7 @@ from __future__ import annotations +import os from pathlib import Path import subprocess import sys @@ -344,6 +345,13 @@ def probe_cli(repository: Path) -> Path: def _run_probe_cli(repository: Path) -> subprocess.CompletedProcess[str]: + # This subprocess imports a disposable copy of loopx that pytest deletes + # after the test. Its source cannot be reported in the CI coverage job. + env = { + key: value + for key, value in os.environ.items() + if not key.startswith("COV_CORE_") and key != "COVERAGE_PROCESS_START" + } return subprocess.run( [ sys.executable, @@ -355,6 +363,7 @@ def _run_probe_cli(repository: Path) -> subprocess.CompletedProcess[str]: capture_output=True, text=True, check=False, + env=env, )