fix: avoid double buffering when using asyncio reader without negotiate_unix_fd (#213)

This commit is contained in:
J. Nick Koston
2023-07-27 22:46:29 -05:00
committed by GitHub
parent e669a13de2
commit c933be7095
13 changed files with 127 additions and 52 deletions

View File

@@ -457,21 +457,18 @@ def test_unmarshall_multiple_messages():
unpacked = unpack_variants(message.body)
assert unpacked == ["org.bluez.Device1", {"RSSI": -76}, []]
unmarshaller.reset()
assert unmarshaller.unmarshall()
message = unmarshaller.message
assert message is not None
unpacked = unpack_variants(message.body)
assert unpacked == ["org.bluez.Device1", {"RSSI": -80}, []]
unmarshaller.reset()
assert unmarshaller.unmarshall()
message = unmarshaller.message
assert message is not None
unpacked = unpack_variants(message.body)
assert unpacked == ["org.bluez.Device1", {"RSSI": -94}, []]
unmarshaller.reset()
with pytest.raises(EOFError):
unmarshaller.unmarshall()