python: Cleanup run_tests_or_dispatch.

This commit is contained in:
Emilio Cobos Álvarez 2016-11-09 11:56:45 +01:00
parent 333c397f03
commit d9d78bf5d4
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -408,7 +408,6 @@ class MachCommands(CommandBase):
def run_test_list_or_dispatch(self, requested_paths, correct_suite, correct_function, **kwargs):
if not requested_paths:
return correct_function(**kwargs)
else:
# Paths specified on command line. Ensure they can be handled, re-dispatch otherwise.
all_handled = True
for test_path in requested_paths:
@ -418,7 +417,6 @@ class MachCommands(CommandBase):
print("Warning: %s is not a %s test. Delegating to test-%s." % (test_path, correct_suite, suite))
if all_handled:
return correct_function(**kwargs)
else:
# Dispatch each test to the correct suite via test()
Registrar.dispatch("test", context=self.context, params=requested_paths)