Skip to content
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

Merged
merged 4 commits into from Apr 17, 2022

Conversation

hauntsaninja
Copy link
Contributor

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.

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.
@hauntsaninja
Copy link
Contributor Author

cc @hroncok

Copy link
Contributor

@henryiii henryiii left a 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.

src/build/env.py Outdated Show resolved Hide resolved
@layday
Copy link
Member

layday commented Apr 16, 2022

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 venv.EnvBuilder.create instead?

@layday
Copy link
Member

layday commented Apr 16, 2022

I suppose we can also get rid of the skip decorator since the same is true for Python 3.11.

@hauntsaninja hauntsaninja changed the title Fix mock in test_executable_missing_post_creation for Python 3.11 Fix test_executable_missing_post_creation for Python 3.11, PyPy Apr 17, 2022
Copy link
Member

@layday layday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@layday layday merged commit 94e5838 into pypa:main Apr 17, 2022
@FFY00
Copy link
Member

FFY00 commented Apr 17, 2022

Forgot to change the commit message again 😣

@FFY00
Copy link
Member

FFY00 commented Apr 17, 2022

Wait, I thought I was the was the one merging this, perhaps you were too fast 😅

@layday
Copy link
Member

layday commented Apr 17, 2022

Yeah, I forgot too.

@FFY00
Copy link
Member

FFY00 commented Apr 17, 2022

Yeah, no worries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants