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

This commit is contained in:
Lysandros Nikolaou 2020-06-06 07:21:40 +03:00 committed by GitHub
parent 2e6593db00
commit ba6fd87e41
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",
)