Chromium Code Reviews| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py |
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py |
| index 34f22db329f015e55226e6b3804a1bcbb1295186..61a6bd7e03f2d5352200941a756fc0c92ea7de60 100644 |
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py |
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py |
| @@ -35,7 +35,6 @@ import urllib2 |
| from webkitpy.layout_tests.layout_package.json_results_generator import convert_times_trie_to_flat_paths |
| from webkitpy.layout_tests.models import test_expectations |
| - |
| _log = logging.getLogger(__name__) |
| @@ -94,8 +93,7 @@ class LayoutTestFinder(object): |
| times = convert_times_trie_to_flat_paths(times_trie) |
| # Ignore tests with a time==0 because those are skipped tests. |
| - sorted_times = sorted([test for (test, time) in times.iteritems() if time], |
| - key=lambda t: (times[t], t)) |
| + sorted_times = sorted([test for (test, time) in times.iteritems() if time], key=lambda t: (times[t], t)) |
| clamped_percentile = max(0, min(100, fastest_percentile)) |
| number_of_tests_to_return = int(len(sorted_times) * clamped_percentile / 100) |
| fastest_tests = set(sorted_times[:number_of_tests_to_return]) |
| @@ -186,9 +184,9 @@ class LayoutTestFinder(object): |
| try: |
| (chunk_num, chunk_len) = chunk_value.split(":") |
| chunk_num = int(chunk_num) |
| - assert(chunk_num >= 0) |
| + assert (chunk_num >= 0) |
| test_size = int(chunk_len) |
| - assert(test_size > 0) |
| + assert (test_size > 0) |
| except AssertionError: |
| _log.critical("invalid chunk '%s'" % chunk_value) |
| return (None, None) |
| @@ -204,8 +202,8 @@ class LayoutTestFinder(object): |
| slice_start = (chunk_num * chunk_len) % num_tests |
| else: |
| # Validate the data. |
| - assert(test_size <= num_tests) |
| - assert(chunk_num <= test_size) |
| + assert (test_size <= num_tests) |
| + assert (chunk_num <= test_size) |
| # To count the chunk_len, and make sure we don't skip |
| # some tests, we round to the next value that fits exactly |
| @@ -218,7 +216,7 @@ class LayoutTestFinder(object): |
| slice_start = chunk_len * (chunk_num - 1) |
| # It does not mind if we go over test_size. |
| - # Get the end offset of the slice. |
| + # Get the end offset of the slice. |
|
Dirk Pranke
2016/03/19 02:19:56
this looks like a bug (the comment shouldn't have
qyearsley
2016/03/19 18:11:43
That's right -- I just checked, and they have an i
|
| slice_end = min(num_tests, slice_start + chunk_len) |
| tests_to_run = test_names[slice_start:slice_end] |