Skip to content

Commit 60410f3

Browse files
authored
[3.12] gh-129269: Exclude everything in sys.path in test_coverage_ignore (gh-130133) (gh-130358)
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 35925e9)
1 parent 77cba87 commit 60410f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_trace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def test_coverage_ignore(self):
390390
libpath = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
391391
# sys.prefix does not work when running from a checkout
392392
tracer = trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,
393-
libpath], trace=0, count=1)
393+
libpath] + sys.path, trace=0, count=1)
394394
with captured_stdout() as stdout:
395395
self._coverage(tracer)
396396
if os.path.exists(TESTFN):

0 commit comments

Comments
 (0)