(serialized_script, expected_tokens, test_roundtrip=True)
| 82 | class 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 |
nothing calls this directly
no test coverage detected