https://github.com/python/cpython/commit/ef66394677d15616a79ee2423aa1219ad74fba43
commit: ef66394677d15616a79ee2423aa1219ad74fba43
branch: 3.13
author: Sam Gross <[email protected]>
committer: colesbury <[email protected]>
date: 2025-02-20T15:42:47Z
summary:
[3.13] gh-129269: Exclude everything in sys.path in `test_coverage_ignore`
(gh-130133) (gh-130357)
The `test_trace.test_coverage_ignore` test would fail if you had
`setuptools` installed, such as in `~/.local/lib/python3.xxx/site-packages/`.
Ignore everything in `sys.path` when running the test.
(cherry picked from commit 35925e952911aba97bfdaee85b09d734ceac4fea)
files:
M Lib/test/test_trace.py
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py
index 7ff3fe4091dfa4..f02745985e7239 100644
--- a/Lib/test/test_trace.py
+++ b/Lib/test/test_trace.py
@@ -392,7 +392,7 @@ def test_coverage_ignore(self):
libpath = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
# sys.prefix does not work when running from a checkout
tracer = trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,
- libpath], trace=0, count=1)
+ libpath] + sys.path, trace=0, count=1)
with captured_stdout() as stdout:
self._coverage(tracer)
if os.path.exists(TESTFN):
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]