From a08c6eae23159ba900c80ad0c2c64c423701b33f Mon Sep 17 00:00:00 2001 From: Rebecca Chen Date: Fri, 7 Sep 2018 23:42:24 -0700 Subject: [PATCH] Add two more third_party libraries to pytype_test. (#2437) --- tests/pytype_test.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/pytype_test.py b/tests/pytype_test.py index 5cecb99e4..c5dbb10da 100755 --- a/tests/pytype_test.py +++ b/tests/pytype_test.py @@ -181,11 +181,16 @@ def pytype_test(args): '--python36-exe)' % args.python36_exe) return 0, 0 - stdlib = 'stdlib/' - six = 'third_party/.*/six/' - mypy_extensions = 'third_party/.*/mypy_extensions' - wanted = re.compile( - r'(?:%s).*\.pyi$' % '|'.join([stdlib, six, mypy_extensions])) + # TODO(rchen152): Keep expanding our third_party/ coverage so we can move + # to a small blacklist rather than an ever-growing whitelist. + wanted = [ + 'stdlib/', + 'third_party/.*/mypy_extensions', + 'third_party/.*/pkg_resources', + 'third_party/.*/six/', + 'third_party/.*/yaml/', + ] + wanted_re = re.compile(r'(?:%s).*\.pyi$' % '|'.join(wanted)) skip, parse_only = load_blacklist(dirs) skipped = PathMatcher(skip) parse_only = PathMatcher(parse_only) @@ -214,7 +219,7 @@ def pytype_test(args): for f in sorted(filenames): f = os.path.join(root, f) rel = _get_relative(f) - if wanted.search(rel): + if wanted_re.search(rel): if parse_only.search(rel): pytd_run.append(f) elif not skipped.search(rel):