Skip to content

gh-129192: Use EnvironmentVarGuard to restore environment variables #129193

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

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

Eclips4
Copy link
Member

@Eclips4 Eclips4 commented Jan 22, 2025

@Eclips4
Copy link
Member Author

Eclips4 commented Jan 22, 2025

Previously:

eclips4@nixos ~/p/p/cpython (main)> ./python -m test -q test_zipfile
Using random seed: 315532800
0:00:00 load avg: 2.32 Run 1 test sequentially in a single process
test_zipfile failed (env changed)

== Tests result: SUCCESS ==

1 test altered the execution environment (env changed):
    test_zipfile


Total duration: 19.2 sec
Total tests: run=338 skipped=5
Total test files: run=1/1
Result: SUCCESS

With this patch applied:

eclips4@nixos ~/p/p/cpython (fix-test-zipfile)> ./python -m test -q test_zipfile
Using random seed: 315532800
0:00:00 load avg: 1.77 Run 1 test sequentially in a single process

== Tests result: SUCCESS ==

Total duration: 19.9 sec
Total tests: run=338 skipped=5
Total test files: run=1/1
Result: SUCCESS

@Eclips4 Eclips4 enabled auto-merge (squash) January 22, 2025 20:15
@Eclips4 Eclips4 merged commit fc6d4b7 into python:main Jan 22, 2025
41 checks passed
@Eclips4 Eclips4 deleted the fix-test-zipfile branch January 22, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants