-
Notifications
You must be signed in to change notification settings - Fork 0
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
Running tests with coverage
breaks on PyPy
#7
Labels
bug
Something isn't working
Comments
Sachaa-Thanasius
changed the title
Determine why running with
Determine why running tests with Oct 15, 2024
coverage
breaks on pypycoverage
breaks on PyPy
Sachaa-Thanasius
changed the title
Determine why running tests with
Running tests with Oct 15, 2024
coverage
breaks on PyPycoverage
breaks on PyPy
It's an issue with coverage: 7.6.1 works fine, but the versions afterwards (currently the max version is 7.6.3) hit this. |
Using Commands for Reproduction # Clone the necessary repos.
git clone git@github.com:nedbat/coveragepy
cd coveragepy
git clone git@github.com:Sachaa-Thanasius/defer-imports
# Create a pypy env and activate it.
pypy3.9 -m venv .venv
.venv/Scripts/activate
# Prepare environment.
python -m pip install pytest
# Start bisecting.
git bisect start
git bisect bad 7.6.1
git bisect good 7.6.2
git bisect run bash -c "coverage run -m pytest defer-imports/tests" Output
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Running with coverage via
hatch test ...
orcoverage run -m pytest ...
seems to break coverage, but only if run on pypy. The traceback indicatesdefer-imports
's import hook machinery is leaking and polluting coverage's imports, but I'm not sure how or why. A cursory glance at the tests doesn't seem to indicate any leaking global state nor a reason for this to only happen on pypy.Not sure when this started happening, but it was sometime before
abccccc
. I'll need to narrow that down.Through print-debugging, it seems to happen within the
super().exec_module()
call in_DeferredSource.exec_module()
?Traceback
When run with the hatch command above
The text was updated successfully, but these errors were encountered: