-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-32942: Fix environment dependent test_script_helper #8034
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
Conversation
result of function interpreter_requires_environment depends on os.environ - this was not covered by the tests, leading to fail in some environments
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. When your account is ready, please add a comment in this pull request Thanks again for your contribution, we look forward to reviewing it! |
terryjreedy
left a comment
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.
I approve of patch changes text_script_helper result from failure to success ;-). I leave review of detail and merge decision to Victor -- after CLA is signed.
vstinner
left a comment
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.
Don't forget to sign the CLA. Otherwise, we cannot merge your PR.
Lib/test/test_script_helper.py
Outdated
| # Reset the private cached state. | ||
| script_helper.__dict__['__cached_interp_requires_environment'] = None | ||
|
|
||
| @mock.patch('os.environ', {}) |
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.
I would prefer to only modify add/remove variables needed by the function, instead of using a strange empty environment.
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.
Know what you mean, I'm on it.
|
@LorenzMende: Can you please sign the CLA? See #8034 (comment) for details. |
|
@vstinner: Missed one step in the CLA procedure... should be fine now. |
|
Thanks @LorenzMende for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6. |
|
Thanks @LorenzMende for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
GH-8087 is a backport of this pull request to the 3.7 branch. |
Result of function interpreter_requires_environment() depends on os.environ. This was not covered by the tests, leading to fail when PYTHONHOME was set. (cherry picked from commit a390cb6) Co-authored-by: Lorenz Mende <[email protected]>
Result of function interpreter_requires_environment() depends on os.environ. This was not covered by the tests, leading to fail when PYTHONHOME was set. (cherry picked from commit a390cb6) Co-authored-by: Lorenz Mende <[email protected]>
|
GH-8088 is a backport of this pull request to the 3.6 branch. |
Result of function interpreter_requires_environment() depends on os.environ. This was not covered by the tests, leading to fail when PYTHONHOME was set. (cherry picked from commit a390cb6) Co-authored-by: Lorenz Mende <[email protected]>
Result of function interpreter_requires_environment() depends on os.environ. This was not covered by the tests, leading to fail when PYTHONHOME was set. (cherry picked from commit a390cb6) Co-authored-by: Lorenz Mende <[email protected]>
result of function interpreter_requires_environment depends on os.environ - this was not covered by the tests, leading to fail in some environments
3 tests modified, 1 added
https://bugs.python.org/issue32942