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

Side by Side Diff: appengine/findit/model/test/wf_swarming_task_test.py

Issue 2027333002: [Findit] don't included skipped or unknown tests in swarming tasks into failed tests. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: . 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 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 import unittest 5 import unittest
6 6
7 from model.wf_swarming_task import WfSwarmingTask 7 from model.wf_swarming_task import WfSwarmingTask
8 8
9 9
10 class WfSwarmingTaskTest(unittest.TestCase): 10 class WfSwarmingTaskTest(unittest.TestCase):
11 def testClassifiedTests(self): 11 def testClassifiedTests(self):
12 task = WfSwarmingTask.Create('m', 'b', 121, 'browser_tests') 12 task = WfSwarmingTask.Create('m', 'b', 121, 'browser_tests')
13 task.tests_statuses = { 13 task.tests_statuses = {
14 'TestSuite1.test1': { 14 'TestSuite1.test1': {
15 'total_run': 2, 15 'total_run': 2,
16 'SUCCESS': 2 16 'SUCCESS': 2
17 }, 17 },
18 'TestSuite1.test2': { 18 'TestSuite1.test2': {
19 'total_run': 4, 19 'total_run': 4,
20 'SUCCESS': 2, 20 'SUCCESS': 2,
21 'FAILURE': 2 21 'FAILURE': 2
22 }, 22 },
23 'TestSuite1.test3': { 23 'TestSuite1.test3': {
24 'total_run': 6, 24 'total_run': 6,
25 'FAILURE': 6 25 'FAILURE': 6
26 },
27 'TestSuite1.test4': {
28 'total_run': 6,
29 'SKIPPED': 6
30 },
31 'TestSuite1.test5': {
32 'total_run': 6,
33 'UNKNOWN': 6
26 } 34 }
27 } 35 }
28 36
29 expected_classified_tests = { 37 expected_classified_tests = {
30 'flaky_tests': ['TestSuite1.test2', 'TestSuite1.test1'], 38 'flaky_tests': ['TestSuite1.test2', 'TestSuite1.test1'],
31 'reliable_tests': ['TestSuite1.test3'] 39 'reliable_tests': ['TestSuite1.test3', 'TestSuite1.test4'],
40 'unknown_tests': ['TestSuite1.test5']
32 } 41 }
33 42
34 self.assertEqual(expected_classified_tests, task.classified_tests) 43 self.assertEqual(expected_classified_tests, task.classified_tests)
OLDNEW
« no previous file with comments | « appengine/findit/handlers/test/handlers_util_test.py ('k') | appengine/findit/model/wf_swarming_task.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698