Skip to content

Commit 38a7d14

Browse files
committed
Test all frames are writable
User code working with NumPy or Pandas objects often expects the objects to be mutable. However if read-only frames (like `bytes`) objects are used, this is not true. So add a test to check for this so that we can make sure this is true and we can catch and fix cases where that may not be true.
1 parent 4aad337 commit 38a7d14

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

distributed/protocol/tests/test_protocol_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def test_merge_frames(lengths, frames):
2222
data = data[i:]
2323

2424
assert all(isinstance(f, memoryview) for f in result)
25+
assert all(not f.readonly for f in result)
2526
assert list(map(ensure_bytes, result)) == expected
2627

2728

0 commit comments

Comments
 (0)