MCPcopy
hub / github.com/petertodd/python-bitcoinlib / T

Method T

bitcoin/tests/test_script.py:84–92  ·  view source on GitHub ↗
(serialized_script, expected_tokens, test_roundtrip=True)

Source from the content-addressed store, hash-verified

82class Test_CScript(unittest.TestCase):
83 def test_tokenize_roundtrip(self):
84 def T(serialized_script, expected_tokens, test_roundtrip=True):
85 serialized_script = x(serialized_script)
86 script_obj = CScript(serialized_script)
87 actual_tokens = list(script_obj)
88 self.assertEqual(actual_tokens, expected_tokens)
89
90 if test_roundtrip:
91 recreated_script = CScript(actual_tokens)
92 self.assertEqual(recreated_script, serialized_script)
93
94 T('', [])
95

Callers

nothing calls this directly

Calls 9

is_p2shMethod · 0.95
is_push_onlyMethod · 0.95
has_canonical_pushesMethod · 0.95
is_unspendableMethod · 0.95
is_validMethod · 0.95
to_p2sh_scriptPubKeyMethod · 0.95
xFunction · 0.90
b2xFunction · 0.90
CScriptClass · 0.85

Tested by

no test coverage detected