Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.2k
gh-37883: Safely skip test_resource file size tests when limits are strict#145579
Open
Shrey-N wants to merge 3 commits intopython:mainfrom
Open
gh-37883: Safely skip test_resource file size tests when limits are strict#145579Shrey-N wants to merge 3 commits intopython:mainfrom
Shrey-N wants to merge 3 commits intopython:mainfrom
Conversation
python-cla-botbot commentedMar 6, 2026 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
ContributorAuthor
Shrey-N commentedMar 6, 2026
I have added a news entry, though I am not sure if it's necessary or for this fix, Please let me know if I should remove it :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.
This fixes the Standing issue#37883 where
test_resourcewould fail on systems with file size limitationsPrevious attempts (like#140872) tried to introduce massive refactoring and helper classes. Based on reviewer feedback I read there, I have tried a minimal fix
self.skipTestwith an informative message rather than failing with an unhandledOSErrororValueError.try...finallyresource restoration blocks withself.addCleanup(), guaranteeing that limits are reset even during a test assertion failure.Fixes#37883