Make YAPF happy for run_tests.py

pull/20771/head
Lidi Zheng 5 years ago
parent 5c965fa5a0
commit 81499d3c1b
  1. 22
      tools/run_tests/run_tests.py

@ -182,9 +182,9 @@ def get_c_tests(travis, test_lang):
with open('tools/run_tests/generated/tests.json') as f: with open('tools/run_tests/generated/tests.json') as f:
js = json.load(f) js = json.load(f)
return [ return [
tgt for tgt in js tgt for tgt in js if tgt['language'] == test_lang and
if tgt['language'] == test_lang and platform_string() in platform_string() in tgt[platforms_str] and
tgt[platforms_str] and not (travis and tgt['flaky']) not (travis and tgt['flaky'])
] ]
@ -721,7 +721,8 @@ class PythonLanguage(object):
def test_specs(self): def test_specs(self):
# load list of known test suites # load list of known test suites
with open(self._TEST_SPECS_FILE[self.args.iomgr_platform]) as tests_json_file: with open(self._TEST_SPECS_FILE[
self.args.iomgr_platform]) as tests_json_file:
tests_json = json.load(tests_json_file) tests_json = json.load(tests_json_file)
environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS)
return [ return [
@ -731,8 +732,9 @@ class PythonLanguage(object):
environ=dict( environ=dict(
list(environment.items()) + [( list(environment.items()) + [(
'GRPC_PYTHON_TESTRUNNER_FILTER', str(suite_name))]), 'GRPC_PYTHON_TESTRUNNER_FILTER', str(suite_name))]),
shortname='%s.%s.%s' % (config.name, self._TEST_FOLDER[self.args.iomgr_platform], shortname='%s.%s.%s' %
suite_name), (config.name, self._TEST_FOLDER[self.args.iomgr_platform],
suite_name),
) for suite_name in tests_json for config in self.pythons ) for suite_name in tests_json for config in self.pythons
] ]
@ -818,9 +820,8 @@ class PythonLanguage(object):
if args.iomgr_platform == 'asyncio': if args.iomgr_platform == 'asyncio':
if args.compiler not in ('python3.6', 'python3.7', 'python3.8'): if args.compiler not in ('python3.6', 'python3.7', 'python3.8'):
raise Exception( raise Exception(
'Compiler %s not supported with IO Manager platform:' % ( 'Compiler %s not supported with IO Manager platform:' %
args.compiler, (args.compiler, args.iomgr_platform))
args.iomgr_platform))
config_vars = _PythonConfigVars( config_vars = _PythonConfigVars(
shell, builder, builder_prefix_arguments, venv_relative_python, shell, builder, builder_prefix_arguments, venv_relative_python,
@ -1636,8 +1637,7 @@ if any(language.make_options() for language in languages):
# together, and is only used under gcov. All other configs should build languages individually. # together, and is only used under gcov. All other configs should build languages individually.
language_make_options = list( language_make_options = list(
set([ set([
make_option make_option for lang in languages
for lang in languages
for make_option in lang.make_options() for make_option in lang.make_options()
])) ]))

Loading…
Cancel
Save