(self)
| 1111 | yield from do(ast.AST) |
| 1112 | |
| 1113 | def test_pickling(self): |
| 1114 | import pickle |
| 1115 | |
| 1116 | for protocol in range(pickle.HIGHEST_PROTOCOL + 1): |
| 1117 | for code in exec_tests: |
| 1118 | with self.subTest(code=code, protocol=protocol): |
| 1119 | tree = compile(code, "?", "exec", 0x400) |
| 1120 | ast2 = pickle.loads(pickle.dumps(tree, protocol)) |
| 1121 | self.assertEqual(to_tuple(ast2), to_tuple(tree)) |
| 1122 | |
| 1123 | @skip_if_unlimited_stack_size |
| 1124 | def test_copy_with_parents(self): |