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

Method test_from_data

bitcoin/tests/test_bech32.py:55–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53
54class Test_CBech32Data(unittest.TestCase):
55 def test_from_data(self):
56 b = CBech32Data.from_bytes(0, unhexlify('751e76e8199196d454941c45d1b3a323f1433bd6'))
57 self.assertEqual(b.witver, 0)
58 self.assertEqual(str(b).upper(), 'BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4')
59
60 def test_invalid_bech32_exception(self):
61

Callers

nothing calls this directly

Calls 1

from_bytesMethod · 0.45

Tested by

no test coverage detected