MCPcopy Create free account
hub / github.com/microsoft/debugpy / test_read

Method test_read

tests/debugpy/common/test_messaging.py:85–93  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 cls.SERIALIZED_MESSAGES += message_header.encode("ascii") + message_body
84
85 def test_read(self):
86 data = io.BytesIO(self.SERIALIZED_MESSAGES)
87 stream = messaging.JsonIOStream(data, data, "data")
88 for expected_message in self.MESSAGES:
89 message = stream.read_json()
90 assert message == expected_message
91 with pytest.raises(messaging.NoMoreMessages) as exc_info:
92 stream.read_json()
93 assert exc_info.value.stream is stream
94
95 def test_write(self):
96 data = io.BytesIO()

Callers

nothing calls this directly

Calls 1

read_jsonMethod · 0.95

Tested by

no test coverage detected