mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
[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 35925e9529)
This commit is contained in:
parent
77cba87472
commit
60410f3c76
1 changed files with 1 additions and 1 deletions
|
|
@ -390,7 +390,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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue