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

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

Issue 1591003002: [Findit] Modify tryjob pipelines to trigger try jobs for test failure. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: If different tests within the same step fail in different revisions, all revisions should be culpri… Created 4 years, 11 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 import wf_analysis_status 7 from model import wf_analysis_status
8 from model.wf_try_job import WfTryJob 8 from model.wf_try_job import WfTryJob
9 9
10 10
11 class WfTryJobTest(unittest.TestCase): 11 class WfTryJobTest(unittest.TestCase):
12 def testWfTryJobStatusIsCompleted(self): 12 def testWfTryJobStatusIsCompleted(self):
13 for status in (wf_analysis_status.ANALYZED, wf_analysis_status.ERROR): 13 for status in (wf_analysis_status.ANALYZED, wf_analysis_status.ERROR):
14 tryjob = WfTryJob.Create('m', 'b', 123) 14 try_job = WfTryJob.Create('m', 'b', 123)
stgao 2016/01/26 00:51:40 If you like, the rename here and in other files co
chanli 2016/01/27 18:49:55 Got it. Done.
15 tryjob.status = status 15 try_job.status = status
16 self.assertTrue(tryjob.completed) 16 self.assertTrue(try_job.completed)
17 17
18 def testWfTryJobStatusIsNotCompleted(self): 18 def testWfTryJobStatusIsNotCompleted(self):
19 for status in (wf_analysis_status.PENDING, wf_analysis_status.ANALYZING): 19 for status in (wf_analysis_status.PENDING, wf_analysis_status.ANALYZING):
20 tryjob = WfTryJob.Create('m', 'b', 123) 20 try_job = WfTryJob.Create('m', 'b', 123)
21 tryjob.status = status 21 try_job.status = status
22 self.assertFalse(tryjob.completed) 22 self.assertFalse(try_job.completed)
23 23
24 def testWfTryJobStatusIsFailed(self): 24 def testWfTryJobStatusIsFailed(self):
25 tryjob = WfTryJob.Create('m', 'b', 123) 25 try_job = WfTryJob.Create('m', 'b', 123)
26 tryjob.status = wf_analysis_status.ERROR 26 try_job.status = wf_analysis_status.ERROR
27 self.assertTrue(tryjob.failed) 27 self.assertTrue(try_job.failed)
28 28
29 def testWfTryJobStatusIsNotFailed(self): 29 def testWfTryJobStatusIsNotFailed(self):
30 for status in (wf_analysis_status.PENDING, wf_analysis_status.ANALYZING, 30 for status in (wf_analysis_status.PENDING, wf_analysis_status.ANALYZING,
31 wf_analysis_status.ANALYZED): 31 wf_analysis_status.ANALYZED):
32 tryjob = WfTryJob.Create('m', 'b', 123) 32 try_job = WfTryJob.Create('m', 'b', 123)
33 tryjob.status = status 33 try_job.status = status
34 self.assertFalse(tryjob.failed) 34 self.assertFalse(try_job.failed)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698