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

Method test_encode_decode

bitcoin/tests/test_base58.py:28–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26
27class Test_base58(unittest.TestCase):
28 def test_encode_decode(self):
29 for exp_bin, exp_base58 in load_test_vectors('base58_encode_decode.json'):
30 exp_bin = unhexlify(exp_bin.encode('utf8'))
31
32 act_base58 = encode(exp_bin)
33 act_bin = decode(exp_base58)
34
35 self.assertEqual(act_base58, exp_base58)
36 self.assertEqual(act_bin, exp_bin)
37
38class Test_CBase58Data(unittest.TestCase):
39 def test_from_data(self):

Callers

nothing calls this directly

Calls 3

load_test_vectorsFunction · 0.70
encodeFunction · 0.50
decodeFunction · 0.50

Tested by

no test coverage detected