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

Method test_bool

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

Source from the content-addressed store, hash-verified

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
44 r = lambda x: self.rbuf(x).read_bool() # noqa
45 tc = [(True, '01'),
46 (False, '00')]
47 for p in tc:
48 assert w(p[0]) == self._b(p[1])
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

Callers

nothing calls this directly

Calls 4

_bMethod · 0.95
write_flushMethod · 0.80
write_boolMethod · 0.80
read_boolMethod · 0.80

Tested by

no test coverage detected