(self)
| 108 | assert self.wbuf._bitlength(Py26Int(42)) == 6 |
| 109 | |
| 110 | def test_mpint1(self): |
| 111 | mpint1w = lambda x: self.wbuf().write_mpint1(x).write_flush() # noqa |
| 112 | mpint1r = lambda x: self.rbuf(x).read_mpint1() # noqa |
| 113 | tc = [(0x0, '00 00'), |
| 114 | (0x1234, '00 0d 12 34'), |
| 115 | (0x12345, '00 11 01 23 45'), |
| 116 | (0xdeadbeef, '00 20 de ad be ef')] |
| 117 | for p in tc: |
| 118 | assert mpint1w(p[0]) == self._b(p[1]) |
| 119 | assert mpint1r(self._b(p[1])) == p[0] |
| 120 | |
| 121 | def test_mpint2(self): |
| 122 | mpint2w = lambda x: self.wbuf().write_mpint2(x).write_flush() # noqa |
nothing calls this directly
no test coverage detected