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

Method test_int

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

Source from the content-addressed store, hash-verified

49 assert r(self._b(p[1])) == p[0]
50
51 def test_int(self):
52 w = lambda x: self.wbuf().write_int(x).write_flush() # noqa
53 r = lambda x: self.rbuf(x).read_int() # noqa
54 tc = [(0x00, '00 00 00 00'),
55 (0x01, '00 00 00 01'),
56 (0xabcd, '00 00 ab cd'),
57 (0xffffffff, 'ff ff ff ff')]
58 for p in tc:
59 assert w(p[0]) == self._b(p[1])
60 assert r(self._b(p[1])) == p[0]
61
62 def test_string(self):
63 w = lambda x: self.wbuf().write_string(x).write_flush() # noqa

Callers

nothing calls this directly

Calls 4

_bMethod · 0.95
write_flushMethod · 0.80
write_intMethod · 0.80
read_intMethod · 0.80

Tested by

no test coverage detected