| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 common.waterfall import failure_type | 9 from common.waterfall import failure_type |
| 10 from model.wf_analysis import WfAnalysis | 10 from model.wf_analysis import WfAnalysis |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 def testFailureTypeForLegacyDataWithFailedCompileStep(self): | 133 def testFailureTypeForLegacyDataWithFailedCompileStep(self): |
| 134 analysis = WfAnalysis.Create('m', 'b', 123) | 134 analysis = WfAnalysis.Create('m', 'b', 123) |
| 135 analysis.result = {'failures': [{'step_name': 'compile'}]} | 135 analysis.result = {'failures': [{'step_name': 'compile'}]} |
| 136 self.assertEqual(failure_type.COMPILE, analysis.failure_type) | 136 self.assertEqual(failure_type.COMPILE, analysis.failure_type) |
| 137 | 137 |
| 138 def testFailureTypeForLegacyDataWithFailedTestStep(self): | 138 def testFailureTypeForLegacyDataWithFailedTestStep(self): |
| 139 analysis = WfAnalysis.Create('m', 'b', 123) | 139 analysis = WfAnalysis.Create('m', 'b', 123) |
| 140 analysis.result = {'failures': [{'step_name': 'browser_tests'}]} | 140 analysis.result = {'failures': [{'step_name': 'browser_tests'}]} |
| 141 self.assertEqual(failure_type.TEST, analysis.failure_type) | 141 self.assertEqual(failure_type.TEST, analysis.failure_type) |
| 142 |
| 143 def testFailureTypeStr(self): |
| 144 analysis = WfAnalysis.Create('m', 'b', 123) |
| 145 analysis.result = {'failures': [{'step_name': 'browser_tests'}]} |
| 146 self.assertEqual('test', analysis.failure_type_str) |
| OLD | NEW |