]> granicus.if.org Git - python/commitdiff
Make Demo/parser/test_parser.py run.
authorMark Dickinson <dickinsm@gmail.com>
Sun, 4 Jul 2010 18:49:18 +0000 (18:49 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 4 Jul 2010 18:49:18 +0000 (18:49 +0000)
Demo/parser/test_parser.py

index 7d6db6b6bc0e46671b209cc8076fed20b4ba0c5d..ffa6630f0e6697ec31df8566bf6e7fe5ab5b580b 100755 (executable)
@@ -11,19 +11,19 @@ def testChunk(t, fileName):
     global _numFailed
     print('----', fileName, end=' ')
     try:
-        ast = parser.suite(t)
-        tup = parser.ast2tuple(ast)
-        # this discards the first AST; a huge memory savings when running
+        st = parser.suite(t)
+        tup = parser.st2tuple(st)
+        # this discards the first ST; a huge memory savings when running
         # against a large source file like Tkinter.py.
-        ast = None
-        new = parser.tuple2ast(tup)
+        st = None
+        new = parser.tuple2st(tup)
     except parser.ParserError as err:
         print()
         print('parser module raised exception on input file', fileName + ':')
         traceback.print_exc()
         _numFailed = _numFailed + 1
     else:
-        if tup != parser.ast2tuple(new):
+        if tup != parser.st2tuple(new):
             print()
             print('parser module failed on input file', fileName)
             _numFailed = _numFailed + 1