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
Fix test_executable_missing_post_creation for Python 3.11, PyPy #459
Conversation
As a result of python/cpython#31034, venv now calls sysconfig.get_paths. This messes up the mock call count. The change to using Signature.bind isn't strictly necessary, but fixes the initial symptom (since venv calls sysconfig.get_paths without kwargs). This also means we can use sysconfig.get_paths however we want.
cc @hroncok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The PyPy 3.7 Windows builds broke 4-11 days ago; guessing it might be the PyPy 7.3.9 release. Look like pytest-rerun-failures is breaking it. The other libraries I checked haven't had releases in that time frame.
I feel like this is a lot of unnecessary work just to test that a file which does not exist will produce an error. Can we mock |
I suppose we can also get rid of the skip decorator since the same is true for Python 3.11. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Forgot to change the commit message again 😣 |
Wait, I thought I was the was the one merging this, perhaps you were too fast 😅 |
Yeah, I forgot too. |
Yeah, no worries. |
As a result of python/cpython#31034,
venv now calls sysconfig.get_paths. This messes up the mock call
count.
The change to using Signature.bind isn't strictly necessary, but fixes
the initial symptom (since venv calls sysconfig.get_paths without
kwargs). This also means we can use sysconfig.get_paths however we want.