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

Side by Side Diff: tools/auto_bisect/bisect_results_test.py

Issue 1001033004: Fix style in tools/auto_bisect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 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 unified diff | Download patch
« no previous file with comments | « tools/auto_bisect/bisect_results.py ('k') | tools/auto_bisect/bisect_utils.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 os 5 import os
6 import unittest 6 import unittest
7 7
8 from bisect_results import BisectResults 8 from bisect_results import BisectResults
9 import source_control 9 import source_control
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 self.assertAlmostEqual(99.9, results.confidence) 228 self.assertAlmostEqual(99.9, results.confidence)
229 self.assertAlmostEqual(1909.86547085, results.regression_size) 229 self.assertAlmostEqual(1909.86547085, results.regression_size)
230 self.assertAlmostEqual(7.16625904, results.regression_std_err) 230 self.assertAlmostEqual(7.16625904, results.regression_std_err)
231 231
232 def testFindsCulpritRevisions(self): 232 def testFindsCulpritRevisions(self):
233 revision_states = self.mock_bisect_state.mock_revision_states 233 revision_states = self.mock_bisect_state.mock_revision_states
234 revision_states[1].depot = 'chromium' 234 revision_states[1].depot = 'chromium'
235 revision_states[2].depot = 'webkit' 235 revision_states[2].depot = 'webkit'
236 236
237 results = BisectResults(self.mock_bisect_state, self.mock_depot_registry, 237 results = BisectResults(self.mock_bisect_state, self.mock_depot_registry,
238 self.mock_opts, self.mock_warnings) 238 self.mock_opts, self.mock_warnings)
239 239
240 self.assertEqual(1, len(results.culprit_revisions)) 240 self.assertEqual(1, len(results.culprit_revisions))
241 self.assertEqual(('b', {'test': 'b'}, 'chromium'), 241 self.assertEqual(('b', {'test': 'b'}, 'chromium'),
242 results.culprit_revisions[0]) 242 results.culprit_revisions[0])
243 243
244 def testFindsOtherRegressions(self): 244 def testFindsOtherRegressions(self):
245 revision_states = self.mock_bisect_state.mock_revision_states 245 revision_states = self.mock_bisect_state.mock_revision_states
246 revision_states[0].passed = 0 246 revision_states[0].passed = 0
247 revision_states[0].value = {'values': [100, 100, 100]} 247 revision_states[0].value = {'values': [100, 100, 100]}
248 revision_states[1].passed = 0 248 revision_states[1].passed = 0
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 revision_states[3].value = {'values': [100, 105, 95]} 293 revision_states[3].value = {'values': [100, 105, 95]}
294 revision_states[4].value = {'values': [100, 105, 95]} 294 revision_states[4].value = {'values': [100, 105, 95]}
295 results = BisectResults(self.mock_bisect_state, self.mock_depot_registry, 295 results = BisectResults(self.mock_bisect_state, self.mock_depot_registry,
296 self.mock_opts, self.mock_warnings) 296 self.mock_opts, self.mock_warnings)
297 self.assertEqual(0, results.confidence) 297 self.assertEqual(0, results.confidence)
298 self.assertEqual(1, len(results.warnings)) 298 self.assertEqual(1, len(results.warnings))
299 299
300 300
301 if __name__ == '__main__': 301 if __name__ == '__main__':
302 unittest.main() 302 unittest.main()
OLDNEW
« no previous file with comments | « tools/auto_bisect/bisect_results.py ('k') | tools/auto_bisect/bisect_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698