diff options
author | Guido van Rossum <guido@python.org> | 2007-03-18 15:41:51 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-03-18 15:41:51 (GMT) |
commit | 52cc1d838f4fee573e57b5b182d8e5f5db63240f (patch) | |
tree | 0ea50468d2b04ee12131c155c5918e8a70dafe1c /Lib/test/test_ast.py | |
parent | ef17c16b366b09a78dfe5fc5171fe2b0b29f60e5 (diff) | |
download | cpython-52cc1d838f4fee573e57b5b182d8e5f5db63240f.zip cpython-52cc1d838f4fee573e57b5b182d8e5f5db63240f.tar.gz cpython-52cc1d838f4fee573e57b5b182d8e5f5db63240f.tar.bz2 |
Implement PEP 3115 -- new metaclass syntax and semantics.
The compiler package hasn't been updated yet; test_compiler.py fails.
Otherwise all tests seem to be passing now. There are no occurrences
of __metaclass__ left in the standard library.
Docs have not been updated.
Diffstat (limited to 'Lib/test/test_ast.py')
-rw-r--r-- | Lib/test/test_ast.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index 5d22053..c702ab1 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -144,13 +144,19 @@ def run_tests(): (eval_tests, eval_results, "eval")): for i, o in itertools.izip(input, output): ast_tree = compile(i, "?", kind, 0x400) + if to_tuple(ast_tree) != o: + print("i=", i) + print("o=", o) + print("kind=", kind) + print("tree=", ast_tree) + print("tuple=", to_tuple(ast_tree)) assert to_tuple(ast_tree) == o test_order(ast_tree, (0, 0)) #### EVERYTHING BELOW IS GENERATED ##### exec_results = [ ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, None, [], None, None, [], []), [('Pass', (1, 9))], [], None)]), -('Module', [('ClassDef', (1, 0), 'C', [], [('Pass', (1, 8))])]), +('Module', [('ClassDef', (1, 0), 'C', [], [], None, None, [('Pass', (1, 8))])]), ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, None, [], None, None, [], []), [('Return', (1, 8), ('Num', (1, 15), 1))], [], None)]), ('Module', [('Delete', (1, 0), [('Name', (1, 4), 'v', ('Del',))])]), ('Module', [('Assign', (1, 0), [('Name', (1, 0), 'v', ('Store',))], ('Num', (1, 4), 1))]), |