diff options
Diffstat (limited to 'Lib/lib2to3/tests/support.py')
-rw-r--r-- | Lib/lib2to3/tests/support.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/lib2to3/tests/support.py b/Lib/lib2to3/tests/support.py index fe084e8..8f12de9 100644 --- a/Lib/lib2to3/tests/support.py +++ b/Lib/lib2to3/tests/support.py @@ -3,8 +3,10 @@ # Python imports import unittest +import sys import os import os.path +import re from textwrap import dedent # Local imports @@ -15,13 +17,7 @@ test_dir = os.path.dirname(__file__) proj_dir = os.path.normpath(os.path.join(test_dir, "..")) grammar_path = os.path.join(test_dir, "..", "Grammar.txt") grammar = pgen2_driver.load_grammar(grammar_path) -grammar_no_print_statement = pgen2_driver.load_grammar(grammar_path) -del grammar_no_print_statement.keywords["print"] driver = pgen2_driver.Driver(grammar, convert=pytree.convert) -driver_no_print_statement = pgen2_driver.Driver( - grammar_no_print_statement, - convert=pytree.convert -) def parse_string(string): return driver.parse_string(reformat(string), debug=True) @@ -32,7 +28,7 @@ def run_all_tests(test_mod=None, tests=None): unittest.TextTestRunner(verbosity=2).run(tests) def reformat(string): - return dedent(string) + "\n\n" + return dedent(string) + u"\n\n" def get_refactorer(fixer_pkg="lib2to3", fixers=None, options=None): """ |