Skip to content

gh-159361: Exercise load in the pickle closed-file test - #159332

Draft
esadomer wants to merge 3 commits into
python:mainfrom
esadomer:fix-20261013-03-pickle-closed-load-test
Draft

esadomer wants to merge 3 commits into
python:mainfrom
esadomer:fix-20261013-03-pickle-closed-load-test

Conversation

@esadomer

@esadomer esadomer commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

test_load_closed_file currently calls dump, duplicating the neighboring test. Call load on a closed readable binary file so both pickle implementations actually exercise the intended failure path. This only repairs test coverage; no NEWS entry is needed.

Validation (Windows debug build): both Python and C cases passed; replacing load with a no-op made both corrected cases fail. The complete test_pickle module passed. The isolated patch applies cleanly to the base revision.

Fixes #159361.

@esadomer esadomer changed the title Exercise load in the pickle closed-file test gh-159361: Exercise load in the pickle closed-file test Oct 13, 2026
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.

Pickle closed-file loading test exercises dumping instead of loading

1 participant