Refactor scripts in Tools/peg_generator/scripts (GH-20401)

(cherry picked from commit ba6fd87e41)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
This commit is contained in:
Miss Islington (bot) 2020-06-05 21:41:12 -07:00 committed by GitHub
parent d5e7348e41
commit 18f1226884
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 146 additions and 147 deletions

View file

@ -57,22 +57,11 @@ def find_dirname(package_name: str) -> str:
def run_tests(dirname: str, tree: int) -> int:
return test_parse_directory.parse_directory(
dirname,
HERE / ".." / ".." / ".." / "Grammar" / "python.gram",
HERE / ".." / ".." / ".." / "Grammar" / "Tokens",
verbose=False,
excluded_files=[
"*/failset/*",
"*/failset/**",
"*/failset/**/*",
"*/test2to3/*",
"*/test2to3/**/*",
"*/bad*",
"*/lib2to3/tests/data/*",
],
skip_actions=False,
excluded_files=[],
tree_arg=tree,
short=True,
mode=1,
mode=1 if tree else 0,
parser="pegen",
)