MCPcopy
hub / github.com/jtesta/ssh-audit / test_unread

Method test_unread

test/test_buffer.py:22–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 return bytes(bytearray(data))
21
22 def test_unread(self):
23 w = self.wbuf().write_byte(1).write_int(2).write_flush()
24 r = self.rbuf(w)
25 assert r.unread_len == 5
26 r.read_byte()
27 assert r.unread_len == 4
28 r.read_int()
29 assert r.unread_len == 0
30
31 def test_byte(self):
32 w = lambda x: self.wbuf().write_byte(x).write_flush() # noqa

Callers

nothing calls this directly

Calls 5

write_flushMethod · 0.80
write_intMethod · 0.80
write_byteMethod · 0.80
read_byteMethod · 0.80
read_intMethod · 0.80

Tested by

no test coverage detected