Skip to content

Commit

Permalink
Fix-up merge_frames test with writeable header
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Jul 31, 2020
1 parent ce88f34 commit e3d3d8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions distributed/protocol/tests/test_protocol_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
],
)
def test_merge_frames(lengths, frames):
header = {"lengths": lengths}
header = {
"lengths": lengths,
"writeable": len(lengths) * (False,),
}
result = merge_frames(header, frames)

data = b"".join(frames)
Expand All @@ -25,7 +28,7 @@ def test_merge_frames(lengths, frames):
data = data[i:]

assert all(isinstance(f, memoryview) for f in result)
assert all(not f.readonly for f in result)
assert tuple(not f.readonly for f in result) == header["writeable"]
assert list(map(ensure_bytes, result)) == expected


Expand Down

0 comments on commit e3d3d8c

Please sign in to comment.