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

Side by Side Diff: appengine/findit/crash/test/detect_regression_range_test.py

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: rebase-update Created 4 years, 3 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 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 from testing_utils import testing 5 from testing_utils import testing
6 6
7 from crash.detect_regression_range import GetSpikes 7 from crash.detect_regression_range import GetSpikes, DetectRegressionRange
8 from crash.detect_regression_range import DetectRegressionRange
9 8
10 9
11 class DetectRegressionRangeTest(testing.AppengineTestCase): 10 class DetectRegressionRangeTest(testing.AppengineTestCase):
12 11
13 def _VerifyCasesForDetectRegressonRange(self, cases): 12 def _VerifyCasesForDetectRegressonRange(self, cases):
14 for case, expected_result in cases: 13 for case, expected_result in cases:
15 result = DetectRegressionRange(case) 14 result = DetectRegressionRange(case)
16 15
17 self.assertEqual(result, expected_result, 'Detected spikes of %s should ' 16 self.assertEqual(result, expected_result, 'Detected spikes of %s should '
18 'be %s, instead of %s' % (repr(case), 17 'be %s, instead of %s' % (repr(case),
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 ('4', '5')), 68 ('4', '5')),
70 ([{'chrome_version': '1', 'cpm': 0.06}, 69 ([{'chrome_version': '1', 'cpm': 0.06},
71 {'chrome_version': '2', 'cpm': 0.0003}, 70 {'chrome_version': '2', 'cpm': 0.0003},
72 {'chrome_version': '3', 'cpm': 0.0007}, 71 {'chrome_version': '3', 'cpm': 0.0007},
73 {'chrome_version': '4', 'cpm': 0.6}, 72 {'chrome_version': '4', 'cpm': 0.6},
74 {'chrome_version': '5', 'cpm': 0.002}], 73 {'chrome_version': '5', 'cpm': 0.002}],
75 ('3', '4'))] 74 ('3', '4'))]
76 75
77 self._VerifyCasesForDetectRegressonRange(cases) 76 self._VerifyCasesForDetectRegressonRange(cases)
78 77
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698