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

Side by Side Diff: appengine/findit/model/flake/test/master_flake_analysis_test.py

Issue 2510223003: [Findit] Fixing analysis mismatch in check flake (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « appengine/findit/model/flake/test/flake_analysis_request_test.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 from datetime import datetime 5 from datetime import datetime
6 6
7 import unittest 7 import unittest
8 8
9 from model import analysis_status 9 from model import analysis_status
10 from model import result_status 10 from model import result_status
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 def testGetIterationsToRerun(self): 131 def testGetIterationsToRerun(self):
132 cases = [ 132 cases = [
133 (-1, {}), 133 (-1, {}),
134 (5, {'key': 'value', 'iterations_to_rerun': 5}), 134 (5, {'key': 'value', 'iterations_to_rerun': 5}),
135 ] 135 ]
136 for expected_rerun, algorithm_parameters in cases: 136 for expected_rerun, algorithm_parameters in cases:
137 analysis = MasterFlakeAnalysis.Create('m', 'b', 123, 's', 't') 137 analysis = MasterFlakeAnalysis.Create('m', 'b', 123, 's', 't')
138 analysis.algorithm_parameters = algorithm_parameters 138 analysis.algorithm_parameters = algorithm_parameters
139 self.assertEqual(expected_rerun, analysis.iterations_to_rerun) 139 self.assertEqual(expected_rerun, analysis.iterations_to_rerun)
140
141 def testGetBuildConfigurationFromKey(self):
142 master_name = 'm'
143 builder_name = 'b'
144 build_number = 123
145 step_name = 's'
146 test_name = 't'
147
148 key = MasterFlakeAnalysis.Create(
149 master_name, builder_name, build_number, step_name, test_name).key
150
151 self.assertEqual(
152 (None, None),
153 MasterFlakeAnalysis.GetBuildConfigurationFromKey(None))
154 self.assertEqual(
155 (master_name, builder_name),
156 MasterFlakeAnalysis.GetBuildConfigurationFromKey(key))
OLDNEW
« no previous file with comments | « appengine/findit/model/flake/test/flake_analysis_request_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698