8000 `test_coverage_ignore` in `test_trace` fails if setuptools is installed · Issue #129269 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

test_coverage_ignore in test_trace fails if setuptools is installed #129269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
colesbury opened this issue Jan 24, 2025 · 0 comments
Closed

test_coverage_ignore in test_trace fails if setuptools is installed #129269

colesbury opened this issue Jan 24, 2025 · 0 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@colesbury
Copy link
Contributor
colesbury commented Jan 24, 2025

Bug report

Bug description:

The test_coverage_ignore test fails if setuptools is installed:

======================================================================
FAIL: test_coverage_ignore (test.test_trace.TestCoverage.test_coverage_ignore)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/raid/sgross/cpython/Lib/test/test_trace.py", line 398, in test_coverage_ignore
    self.assertEqual(files, ['_importlib.cover'])  # Ignore __import__
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: ['_distutils_hack.__init__.cover', 're.__ini[36 chars]ver'] != ['_importlib.cover']

First differing element 0:
'_distutils_hack.__init__.cover'
'_importlib.cover'

First list contains 2 additional elements.
First extra element 1:
're.__init__.cover'

+ ['_importlib.cover']
- ['_distutils_hack.__init__.cover',
-  're.__init__.cover',
-  'collections.__init__.cover']

----------------------------------------------------------------------

You can see this with an installed Python:

python3 -m test test_trace -v

Or from the cpython build without installing CPython:

...
make -j
./python -m ensurepip
./python -m pip install setuptools
./python -m test test_trace -v

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

@colesbury colesbury added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Jan 24, 2025
colesbury added a commit to colesbury/cpython that referenced this issue Feb 14, 2025
…ore`

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.
colesbury added a commit to colesbury/cpython that referenced this issue Feb 20, 2025
…age_ignore` (pythongh-130133)

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)

Co-authored-by: Sam Gross <colesbury@gmail.com>
colesbury added a commit that referenced this issue Feb 20, 2025
…nore` (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)
pull bot pushed a commit to TechPenguineer/cpython that referenced this issue Feb 20, 2025
…ore` (pythongh-130133)

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.
colesbury added a commit that referenced this issue Feb 20, 2025
…nore` (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 35925e9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant
0