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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py

Issue 1839193004: Run auto-formatter (autopep8) on webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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/tool/commands/queries_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
index 12703303803b21da85a9de98a5c31dca582b4d3e..3ca14129ab2a7d4630fea9fea029d8c7f3fc4c48 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
@@ -36,6 +36,7 @@ from webkitpy.tool.mocktool import MockTool, MockOptions
class PrintExpectationsTest(unittest.TestCase):
+
def run_test(self, tests, expected_stdout, platform='test-win-win7', **args):
options = MockOptions(all=False, csv=False, full=False, platform=platform,
include_keyword=[], exclude_keyword=[], paths=False).update(**args)
@@ -67,7 +68,7 @@ class PrintExpectationsTest(unittest.TestCase):
'// For test-win-win7\n'
'failures/expected/text.html [ Failure ]\n'
'failures/expected/timeout.html [ Timeout ]\n'),
- platform='test-win-*')
+ platform='test-win-*')
def test_full(self):
self.run_test(['failures/expected/text.html', 'failures/expected/timeout.html'],
@@ -101,7 +102,9 @@ class PrintExpectationsTest(unittest.TestCase):
'LayoutTests/platform/test-win-win7/TestExpectations\n'),
paths=True)
+
class PrintBaselinesTest(unittest.TestCase):
+
def setUp(self):
self.oc = None
self.tool = MockTool()
@@ -126,34 +129,37 @@ class PrintBaselinesTest(unittest.TestCase):
command = PrintBaselines()
command.bind_to_tool(self.tool)
self.capture_output()
- command.execute(MockOptions(all=False, include_virtual_tests=False, csv=False, platform=None), ['passes/text.html'], self.tool)
+ command.execute(MockOptions(all=False, include_virtual_tests=False,
+ csv=False, platform=None), ['passes/text.html'], self.tool)
stdout, _, _ = self.restore_output()
self.assertMultiLineEqual(stdout,
- ('// For test-win-win7\n'
- 'passes/text-expected.png\n'
- 'passes/text-expected.txt\n'))
+ ('// For test-win-win7\n'
+ 'passes/text-expected.png\n'
+ 'passes/text-expected.txt\n'))
def test_multiple(self):
command = PrintBaselines()
command.bind_to_tool(self.tool)
self.capture_output()
- command.execute(MockOptions(all=False, include_virtual_tests=False, csv=False, platform='test-win-*'), ['passes/text.html'], self.tool)
+ command.execute(MockOptions(all=False, include_virtual_tests=False, csv=False,
+ platform='test-win-*'), ['passes/text.html'], self.tool)
stdout, _, _ = self.restore_output()
self.assertMultiLineEqual(stdout,
- ('// For test-win-win10\n'
- 'passes/text-expected.png\n'
- 'passes/text-expected.txt\n'
- '\n'
- '// For test-win-win7\n'
- 'passes/text-expected.png\n'
- 'passes/text-expected.txt\n'))
+ ('// For test-win-win10\n'
+ 'passes/text-expected.png\n'
+ 'passes/text-expected.txt\n'
+ '\n'
+ '// For test-win-win7\n'
+ 'passes/text-expected.png\n'
+ 'passes/text-expected.txt\n'))
def test_csv(self):
command = PrintBaselines()
command.bind_to_tool(self.tool)
self.capture_output()
- command.execute(MockOptions(all=False, platform='*win7', csv=True, include_virtual_tests=False), ['passes/text.html'], self.tool)
+ command.execute(MockOptions(all=False, platform='*win7', csv=True,
+ include_virtual_tests=False), ['passes/text.html'], self.tool)
stdout, _, _ = self.restore_output()
self.assertMultiLineEqual(stdout,
- ('test-win-win7,passes/text.html,None,png,passes/text-expected.png,None\n'
- 'test-win-win7,passes/text.html,None,txt,passes/text-expected.txt,None\n'))
+ ('test-win-win7,passes/text.html,None,png,passes/text-expected.png,None\n'
+ 'test-win-win7,passes/text.html,None,txt,passes/text-expected.txt,None\n'))

Powered by Google App Engine
This is Rietveld 408576698