mirror of
https://github.com/servo/servo.git
synced 2025-06-29 11:33:39 +01:00
Auto merge of #14150 - emilio:cleanup-py, r=Ms2ger
python: Cleanup run_tests_or_dispatch to avod rightward drift. <!-- Please describe your changes on the following line: --> r? @aneeshusa (or anyone else really). <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14150) <!-- Reviewable:end -->
This commit is contained in:
commit
77c1f6fb55
1 changed files with 11 additions and 13 deletions
|
@ -408,7 +408,6 @@ class MachCommands(CommandBase):
|
||||||
def run_test_list_or_dispatch(self, requested_paths, correct_suite, correct_function, **kwargs):
|
def run_test_list_or_dispatch(self, requested_paths, correct_suite, correct_function, **kwargs):
|
||||||
if not requested_paths:
|
if not requested_paths:
|
||||||
return correct_function(**kwargs)
|
return correct_function(**kwargs)
|
||||||
else:
|
|
||||||
# Paths specified on command line. Ensure they can be handled, re-dispatch otherwise.
|
# Paths specified on command line. Ensure they can be handled, re-dispatch otherwise.
|
||||||
all_handled = True
|
all_handled = True
|
||||||
for test_path in requested_paths:
|
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))
|
print("Warning: %s is not a %s test. Delegating to test-%s." % (test_path, correct_suite, suite))
|
||||||
if all_handled:
|
if all_handled:
|
||||||
return correct_function(**kwargs)
|
return correct_function(**kwargs)
|
||||||
else:
|
|
||||||
# Dispatch each test to the correct suite via test()
|
# Dispatch each test to the correct suite via test()
|
||||||
Registrar.dispatch("test", context=self.context, params=requested_paths)
|
Registrar.dispatch("test", context=self.context, params=requested_paths)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue