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

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

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 flakytests 5 import flakytests
6 6
7 from webkitpy.common.checkout.scm.scm_mock import MockSCM 7 from webkitpy.common.checkout.scm.scm_mock import MockSCM
8 from webkitpy.layout_tests.layout_package import bot_test_expectations 8 from webkitpy.layout_tests.layout_package import bot_test_expectations
9 from webkitpy.layout_tests.builder_list import BuilderList 9 from webkitpy.layout_tests.builder_list import BuilderList
10 from webkitpy.tool.commands.commandtest import CommandsTest 10 from webkitpy.tool.commands.commandtest import CommandsTest
(...skipping 13 matching lines...) Expand all
24 24
25 def __init__(self, builders): 25 def __init__(self, builders):
26 self.builders = builders 26 self.builders = builders
27 27
28 def _expectations_from_test_data(self, builder, test_data): 28 def _expectations_from_test_data(self, builder, test_data):
29 test_data[bot_test_expectations.ResultsJSON.FAILURE_MAP_KEY] = self.FAIL URE_MAP 29 test_data[bot_test_expectations.ResultsJSON.FAILURE_MAP_KEY] = self.FAIL URE_MAP
30 json_dict = { 30 json_dict = {
31 builder: test_data, 31 builder: test_data,
32 } 32 }
33 results = bot_test_expectations.ResultsJSON(builder, json_dict) 33 results = bot_test_expectations.ResultsJSON(builder, json_dict)
34 return bot_test_expectations.BotTestExpectations(results, self.builders, self.builders._exact_matches[builder]["specifiers"]) 34 return bot_test_expectations.BotTestExpectations(
35 results, self.builders, self.builders._exact_matches[builder]["speci fiers"])
35 36
36 def expectations_for_builder(self, builder): 37 def expectations_for_builder(self, builder):
37 if builder == 'foo-builder': 38 if builder == 'foo-builder':
38 return self._expectations_from_test_data(builder, { 39 return self._expectations_from_test_data(builder, {
39 'tests': { 40 'tests': {
40 'pass.html': {'results': [[2, 'FFFP']], 'expected': 'PASS'}, 41 'pass.html': {'results': [[2, 'FFFP']], 'expected': 'PASS'},
41 } 42 }
42 }) 43 })
43 44
44 if builder == 'bar-builder': 45 if builder == 'bar-builder':
(...skipping 29 matching lines...) Expand all
74 tool = MockTool() 75 tool = MockTool()
75 tool.builders = self.fake_builders_list() 76 tool.builders = self.fake_builders_list()
76 command.expectations_factory = FakeBotTestExpectationsFactory 77 command.expectations_factory = FakeBotTestExpectationsFactory
77 options = MockOptions(upload=True) 78 options = MockOptions(upload=True)
78 expected_stdout = flakytests.FlakyTests.OUTPUT % ( 79 expected_stdout = flakytests.FlakyTests.OUTPUT % (
79 flakytests.FlakyTests.HEADER, 80 flakytests.FlakyTests.HEADER,
80 '', 81 '',
81 flakytests.FlakyTests.FLAKINESS_DASHBOARD_URL % '') + '\n' 82 flakytests.FlakyTests.FLAKINESS_DASHBOARD_URL % '') + '\n'
82 83
83 self.assert_execute_outputs(command, options=options, tool=tool, expecte d_stdout=expected_stdout) 84 self.assert_execute_outputs(command, options=options, tool=tool, expecte d_stdout=expected_stdout)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698