diff options
author | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) <greg@krypto.org> | 2016-09-08 00:40:07 (GMT) |
---|---|---|
committer | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) <greg@krypto.org> | 2016-09-08 00:40:07 (GMT) |
commit | dd1c638b92ae1552207451c82ed95aa2c1f07201 (patch) | |
tree | 17c9785172126ca63631dc9207380ff7ac583671 /Lib/lib2to3/tests/support.py | |
parent | d61910c598876788c9b4bf0e116370bbfc5a2f85 (diff) | |
download | cpython-dd1c638b92ae1552207451c82ed95aa2c1f07201.zip cpython-dd1c638b92ae1552207451c82ed95aa2c1f07201.tar.gz cpython-dd1c638b92ae1552207451c82ed95aa2c1f07201.tar.bz2 |
lib2to3.pgen3.driver.load_grammar() now creates a stable cache file
between runs given the same Grammar.txt input regardless of the hash
randomization setting.
Diffstat (limited to 'Lib/lib2to3/tests/support.py')
-rw-r--r-- | Lib/lib2to3/tests/support.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/lib2to3/tests/support.py b/Lib/lib2to3/tests/support.py index 6f2d214..0897177 100644 --- a/Lib/lib2to3/tests/support.py +++ b/Lib/lib2to3/tests/support.py @@ -11,13 +11,13 @@ from textwrap import dedent # Local imports from lib2to3 import pytree, refactor -from lib2to3.pgen2 import driver +from lib2to3.pgen2 import driver as pgen2_driver 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 = driver.load_grammar(grammar_path) -driver = driver.Driver(grammar, convert=pytree.convert) +grammar = pgen2_driver.load_grammar(grammar_path) +driver = pgen2_driver.Driver(grammar, convert=pytree.convert) def parse_string(string): return driver.parse_string(reformat(string), debug=True) |