diff options
author | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) <greg@krypto.org> | 2016-09-08 00:46:26 (GMT) |
---|---|---|
committer | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) <greg@krypto.org> | 2016-09-08 00:46:26 (GMT) |
commit | 0c578d62fce2b98ee4e3be1e171569a67fe56178 (patch) | |
tree | a39ae918d07825ec196ff03c80a971ab70d0e5d8 /Lib/lib2to3/tests/support.py | |
parent | ef37dfcd841bc1565a3e40bbcd0f5354aa150965 (diff) | |
parent | dd1c638b92ae1552207451c82ed95aa2c1f07201 (diff) | |
download | cpython-0c578d62fce2b98ee4e3be1e171569a67fe56178.zip cpython-0c578d62fce2b98ee4e3be1e171569a67fe56178.tar.gz cpython-0c578d62fce2b98ee4e3be1e171569a67fe56178.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 7153bb6..ae7cfe8 100644 --- a/Lib/lib2to3/tests/support.py +++ b/Lib/lib2to3/tests/support.py @@ -9,13 +9,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) |