MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / test_from_uint256

Method test_from_uint256

bitcoin/tests/test_serialize.py:129–134  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

127 self.assertEqual(compact_from_uint256(0x0012), 0x01120000)
128
129 def test_from_uint256(self):
130 self.assertEqual(compact_from_uint256(0x1234), 0x02123400)
131 self.assertEqual(compact_from_uint256(0x123456), 0x03123456)
132 self.assertEqual(compact_from_uint256(0x12345600), 0x04123456)
133 self.assertEqual(compact_from_uint256(0x92340000), 0x05009234)
134 self.assertEqual(compact_from_uint256(0x1234560000000000000000000000000000000000000000000000000000000000), 0x20123456)
135
136class Test_Uint256_Serialize(unittest.TestCase):
137 def test_fixed(self):

Callers

nothing calls this directly

Calls 1

compact_from_uint256Function · 0.85

Tested by

no test coverage detected