Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times_unittest.py

Issue 1806393002: Run yapf on files in webkit/layout_tests/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times_unittest.py
index 97bdf08319369875e3f297df92b02f5e1a4b82a2..ebe3e14d93e159c66b403d9f2f3ed31693e2c01c 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/print_layout_test_times_unittest.py
@@ -33,7 +33,6 @@ from webkitpy.layout_tests.print_layout_test_times import main
class PrintLayoutTestTimesTest(unittest.TestCase):
-
def check(self, args, expected_output, files=None):
host = MockHost()
fs = host.filesystem
@@ -41,7 +40,8 @@ class PrintLayoutTestTimesTest(unittest.TestCase):
if files:
fs.files = files
else:
- fs.write_text_file(fs.join(results_directory, 'times_ms.json'), """
+ fs.write_text_file(
+ fs.join(results_directory, 'times_ms.json'), """
{"foo": {"foo1": {"fast1.html": 10,
"fast2.html": 10,
"slow1.html": 80},
@@ -57,53 +57,37 @@ class PrintLayoutTestTimesTest(unittest.TestCase):
def test_fastest_overall(self):
# This is the fastest 10% of the tests overall (ignoring dir structure, equivalent to -f 0).
- self.check(['--fastest', '10'],
- "bar/bar1/fast5.html 10\n"
- "bar/bar1/fast6.html 10\n"
- "foo/foo1/fast1.html 10\n")
+ self.check(['--fastest', '10'], "bar/bar1/fast5.html 10\n" "bar/bar1/fast6.html 10\n" "foo/foo1/fast1.html 10\n")
def test_fastest_forward_1(self):
# Note that we don't get anything from foo/foo2, as foo/foo1 used up the budget for foo.
- self.check(['-f', '1', '--fastest', '10'],
- "bar/bar1/fast5.html 10\n"
- "foo/foo1/fast1.html 10\n"
- "foo/foo1/fast2.html 10\n")
+ self.check(['-f', '1', '--fastest', '10'], "bar/bar1/fast5.html 10\n" "foo/foo1/fast1.html 10\n" "foo/foo1/fast2.html 10\n")
def test_fastest_back_1(self):
# Here we get one test from each dir, showing that we are going properly breadth-first.
- self.check(['-b', '1', '--fastest', '10'],
- "bar/bar1/fast5.html 10\n"
- "foo/foo1/fast1.html 10\n"
- "foo/foo2/fast3.html 10\n")
+ self.check(['-b', '1', '--fastest', '10'], "bar/bar1/fast5.html 10\n" "foo/foo1/fast1.html 10\n" "foo/foo2/fast3.html 10\n")
def test_no_args(self):
# This should be every test, sorted lexicographically.
- self.check([],
- "bar/bar1/fast5.html 10\n"
- "bar/bar1/fast6.html 10\n"
- "bar/bar1/slow3.html 80\n"
- "foo/foo1/fast1.html 10\n"
- "foo/foo1/fast2.html 10\n"
- "foo/foo1/slow1.html 80\n"
- "foo/foo2/fast3.html 10\n"
- "foo/foo2/fast4.html 10\n"
- "foo/foo2/slow2.html 80\n")
+ self.check([], "bar/bar1/fast5.html 10\n"
+ "bar/bar1/fast6.html 10\n"
+ "bar/bar1/slow3.html 80\n"
+ "foo/foo1/fast1.html 10\n"
+ "foo/foo1/fast2.html 10\n"
+ "foo/foo1/slow1.html 80\n"
+ "foo/foo2/fast3.html 10\n"
+ "foo/foo2/fast4.html 10\n"
+ "foo/foo2/slow2.html 80\n")
def test_total(self):
self.check(['-f', '0'], "300\n")
def test_forward_one(self):
- self.check(['-f', '1'],
- "bar 100\n"
- "foo 200\n")
+ self.check(['-f', '1'], "bar 100\n" "foo 200\n")
def test_backward_one(self):
- self.check(['-b', '1'],
- "bar/bar1 100\n"
- "foo/foo1 100\n"
- "foo/foo2 100\n")
+ self.check(['-b', '1'], "bar/bar1 100\n" "foo/foo1 100\n" "foo/foo2 100\n")
def test_path_to_file(self):
# Tests that we can use a custom file rather than the port's default.
- self.check(['/tmp/times_ms.json'], "foo/bar.html 1\n",
- files={'/tmp/times_ms.json': '{"foo":{"bar.html": 1}}'})
+ self.check(['/tmp/times_ms.json'], "foo/bar.html 1\n", files={'/tmp/times_ms.json': '{"foo":{"bar.html": 1}}'})

Powered by Google App Engine
This is Rietveld 408576698