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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

Issue 2569153003: In "pylint: disable=" comments in webkitpy, use symbolic names. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/abstract_local_server_command.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import optparse 5 import optparse
6 import unittest 6 import unittest
7 7
8 from webkitpy.common.net.buildbot import Build 8 from webkitpy.common.net.buildbot import Build
9 from webkitpy.common.net.layouttestresults import LayoutTestResults 9 from webkitpy.common.net.layouttestresults import LayoutTestResults
10 from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2 10 from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2
11 from webkitpy.common.system.outputcapture import OutputCapture 11 from webkitpy.common.system.outputcapture import OutputCapture
12 from webkitpy.layout_tests.builder_list import BuilderList 12 from webkitpy.layout_tests.builder_list import BuilderList
13 from webkitpy.tool.commands.rebaseline import ( 13 from webkitpy.tool.commands.rebaseline import (
14 AbstractParallelRebaselineCommand, CopyExistingBaselinesInternal, 14 AbstractParallelRebaselineCommand, CopyExistingBaselinesInternal,
15 Rebaseline, RebaselineExpectations, RebaselineJson, RebaselineTest 15 Rebaseline, RebaselineExpectations, RebaselineJson, RebaselineTest
16 ) 16 )
17 from webkitpy.tool.mock_tool import MockWebKitPatch 17 from webkitpy.tool.mock_tool import MockWebKitPatch
18 18
19 19
20 # pylint: disable=protected-access 20 # pylint: disable=protected-access
21 class BaseTestCase(unittest.TestCase): 21 class BaseTestCase(unittest.TestCase):
22 WEB_PREFIX = 'https://storage.googleapis.com/chromium-layout-test-archives/M OCK_Mac10_11/results/layout-test-results' 22 WEB_PREFIX = 'https://storage.googleapis.com/chromium-layout-test-archives/M OCK_Mac10_11/results/layout-test-results'
23 23
24 command_constructor = None 24 command_constructor = None
25 25
26 def setUp(self): 26 def setUp(self):
27 self.tool = MockWebKitPatch() 27 self.tool = MockWebKitPatch()
28 # lint warns that command_constructor might not be set, but this is inte ntional; pylint: disable=E1102 28 # Lint warns that command_constructor might not be set, but this is inte ntional; pylint: disable=not-callable
29 self.command = self.command_constructor() 29 self.command = self.command_constructor()
30 self.command._tool = self.tool 30 self.command._tool = self.tool
31 self.tool.builders = BuilderList({ 31 self.tool.builders = BuilderList({
32 "MOCK Mac10.10 (dbg)": {"port_name": "test-mac-mac10.10", "specifier s": ["Mac10.10", "Debug"]}, 32 "MOCK Mac10.10 (dbg)": {"port_name": "test-mac-mac10.10", "specifier s": ["Mac10.10", "Debug"]},
33 "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": [" Mac10.10", "Release"]}, 33 "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": [" Mac10.10", "Release"]},
34 "MOCK Mac10.11 (dbg)": {"port_name": "test-mac-mac10.11", "specifier s": ["Mac10.11", "Debug"]}, 34 "MOCK Mac10.11 (dbg)": {"port_name": "test-mac-mac10.11", "specifier s": ["Mac10.11", "Debug"]},
35 "MOCK Mac10.11 ASAN": {"port_name": "test-mac-mac10.11", "specifiers ": ["Mac10.11", "Release"]}, 35 "MOCK Mac10.11 ASAN": {"port_name": "test-mac-mac10.11", "specifiers ": ["Mac10.11", "Release"]},
36 "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": [" Mac10.11", "Release"]}, 36 "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": [" Mac10.11", "Release"]},
37 "MOCK Precise": {"port_name": "test-linux-precise", "specifiers": [" Precise", "Release"]}, 37 "MOCK Precise": {"port_name": "test-linux-precise", "specifiers": [" Precise", "Release"]},
38 "MOCK Trusty": {"port_name": "test-linux-trusty", "specifiers": ["Tr usty", "Release"]}, 38 "MOCK Trusty": {"port_name": "test-linux-trusty", "specifiers": ["Tr usty", "Release"]},
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 for cmd_line, cwd in commands: 926 for cmd_line, cwd in commands:
927 out = self.run_command(cmd_line, cwd=cwd) 927 out = self.run_command(cmd_line, cwd=cwd)
928 if 'rebaseline-test-internal' in cmd_line: 928 if 'rebaseline-test-internal' in cmd_line:
929 out = '{"remove-lines": [{"test": "%s", "builder": "%s"}]}\n' % (cmd_line[8], cmd_line[6]) 929 out = '{"remove-lines": [{"test": "%s", "builder": "%s"}]}\n' % (cmd_line[8], cmd_line[6])
930 command_outputs.append([0, out, '']) 930 command_outputs.append([0, out, ''])
931 931
932 new_calls = self.calls[num_previous_calls:] 932 new_calls = self.calls[num_previous_calls:]
933 self.calls = self.calls[:num_previous_calls] 933 self.calls = self.calls[:num_previous_calls]
934 self.calls.append(new_calls) 934 self.calls.append(new_calls)
935 return command_outputs 935 return command_outputs
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/abstract_local_server_command.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698