(self)
| 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 |
| 64 | r = lambda x: self.rbuf(x).read_string() # noqa |
| 65 | tc = [('abc1', '00 00 00 04 61 62 63 31'), |
| 66 | (b'abc2', '00 00 00 04 61 62 63 32')] |
| 67 | for p in tc: |
| 68 | v = p[0] |
| 69 | assert w(v) == self._b(p[1]) |
| 70 | if not isinstance(v, bytes): |
| 71 | v = bytes(bytearray(v, 'utf-8')) |
| 72 | assert r(self._b(p[1])) == v |
| 73 | |
| 74 | def test_list(self): |
| 75 | w = lambda x: self.wbuf().write_list(x).write_flush() # noqa |
nothing calls this directly
no test coverage detected