MCPcopy Index your code
hub / github.com/jtesta/ssh-audit / test_byte

Method test_byte

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

Source from the content-addressed store, hash-verified

29 assert r.unread_len == 0
30
31 def test_byte(self):
32 w = lambda x: self.wbuf().write_byte(x).write_flush() # noqa
33 r = lambda x: self.rbuf(x).read_byte() # noqa
34 tc = [(0x00, '00'),
35 (0x01, '01'),
36 (0x10, '10'),
37 (0xff, 'ff')]
38 for p in tc:
39 assert w(p[0]) == self._b(p[1])
40 assert r(self._b(p[1])) == p[0]
41
42 def test_bool(self):
43 w = lambda x: self.wbuf().write_bool(x).write_flush() # noqa

Callers

nothing calls this directly

Calls 4

_bMethod · 0.95
write_flushMethod · 0.80
write_byteMethod · 0.80
read_byteMethod · 0.80

Tested by

no test coverage detected