Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-37883: Safely skip test_resource file size tests when limits are strict#145579

Open
Shrey-N wants to merge 3 commits intopython:mainfrom
Shrey-N:fixy-branch
Open

gh-37883: Safely skip test_resource file size tests when limits are strict#145579
Shrey-N wants to merge 3 commits intopython:mainfrom
Shrey-N:fixy-branch

Conversation

@Shrey-N
Copy link
Contributor

@Shrey-NShrey-N commentedMar 6, 2026
edited by bedevere-appbot
Loading

This fixes the Standing issue#37883 wheretest_resource would fail on systems with file size limitations

Previous attempts (like#140872) tried to introduce massive refactoring and helper classes. Based on reviewer feedback I read there, I have tried a minimal fix

  • It checks if the system's hard limit is large enough, and if the OS actually allows the limit to be modified. If not, it usesself.skipTest with an informative message rather than failing with an unhandledOSError orValueError.
  • It replaces the fragile dualtry...finally resource restoration blocks withself.addCleanup(), guaranteeing that limits are reset even during a test assertion failure.

Fixes#37883

@bedevere-appbedevere-appbot added the testsTests in the Lib/test dir labelMar 6, 2026
@python-cla-bot
Copy link

python-cla-botbot commentedMar 6, 2026
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

@Shrey-N
Copy link
ContributorAuthor

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 :)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

awaiting reviewtestsTests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

test_resource fails when file size is limited

1 participant

@Shrey-N

[8]ページ先頭

©2009-2026 Movatter.jp