MCPcopy Index your code
hub / github.com/jimmysong/programmingbitcoin / test_serialize

Method test_serialize

code-ch13/script.py:303–307  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

301 self.assertEqual(script.cmds[1], want)
302
303 def test_serialize(self):
304 want = '6a47304402207899531a52d59a6de200179928ca900254a36b8dff8bb75f5f5d71b1cdc26125022008b422690b8461cb52c3cc30330b23d574351872b7c361e9aae3649071c1a7160121035d5c93d9ac96881f19ba1f686f15f009ded7c62efe85a872e6a19b43c15a2937'
305 script_pubkey = BytesIO(bytes.fromhex(want))
306 script = Script.parse(script_pubkey)
307 self.assertEqual(script.serialize().hex(), want)
308
309 def test_address(self):
310 address_1 = '1BenRpVUFK65JFWcQSuHnJKzc4M8ZP8Eqa'

Callers

nothing calls this directly

Calls 3

parseMethod · 0.45
hexMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected