-
Notifications
You must be signed in to change notification settings - Fork 4.3k
GH-51229: [Python] Raise instead of crashing on unopened resize #51246
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1216,6 +1216,11 @@ def test_memory_map_resize(tmpdir): | |
| assert f.read() == bytes(arr[:SIZE]) | ||
|
|
||
|
|
||
| def test_memory_map_resize_uninitialized(): | ||
| with pytest.raises(ValueError, match="I/O operation on closed file"): | ||
| pa.MemoryMappedFile().resize(0) | ||
|
|
||
|
|
||
|
Comment on lines
+1219
to
+1223
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keeping it in-process per #51246 (comment); with the fix it raises rather than crashing.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only the PR description needs an update.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The testing description now matches the in-process regression. |
||
| def test_memory_zero_length(tmpdir): | ||
| path = os.path.join(str(tmpdir), guid()) | ||
| f = open(path, 'wb') | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.