Пример #1
0
 def testStepDoneFailOverridesWarnings(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS, WARNINGS]
     b.result = WARNINGS
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
Пример #2
0
 def testStepDoneWarningsDontOverrideFailure(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [FAILURE]
     b.result = FAILURE
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(WARNINGS, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
Пример #3
0
 def testStepDoneWarnings(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(WARNINGS, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, WARNINGS)
Пример #4
0
 def testStepDoneFail(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
Пример #5
0
 def testStepDoneFailOverridesWarnings(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS, WARNINGS]
     b.result = WARNINGS
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
Пример #6
0
 def testStepDoneWarningsDontOverrideFailure(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [FAILURE]
     b.result = FAILURE
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(WARNINGS, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
Пример #7
0
 def testStepDoneFail(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
Пример #8
0
 def testStepDoneWarnings(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(WARNINGS, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, WARNINGS)
Пример #9
0
 def testStepDoneHaltOnFailure(self):
     r = FakeRequest()
     b = Build([r])
     b.results = []
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     step.haltOnFailure = True
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, True)
     self.assertEqual(b.result, FAILURE)
Пример #10
0
 def testStepDoneHaltOnFailure(self):
     r = FakeRequest()
     b = Build([r])
     b.results = []
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     step.haltOnFailure = True
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, True)
     self.assertEqual(b.result, FAILURE)
Пример #11
0
 def testStepDoneHaltOnFailureFlunkOnWarnings(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     step.flunkOnWarnings = True
     self.haltOnFailure = True
     terminate = b.stepDone(WARNINGS, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
Пример #12
0
 def testStepDoneWarnOnFailure(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     step.warnOnFailure = True
     step.flunkOnFailure = False
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, WARNINGS)
Пример #13
0
 def testStepDoneHaltOnFailureFlunkOnWarnings(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     step.flunkOnWarnings = True
     self.haltOnFailure = True
     terminate = b.stepDone(WARNINGS, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
Пример #14
0
 def testStepDoneWarnOnFailure(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     step.warnOnFailure = True
     step.flunkOnFailure = False
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, WARNINGS)
Пример #15
0
 def testStepDoneRetryOverridesAnythingElse(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [RETRY]
     b.result = RETRY
     b.remote = Mock()
     step = FakeBuildStep()
     step.alwaysRun = True
     b.stepDone(WARNINGS, step)
     b.stepDone(FAILURE, step)
     b.stepDone(SUCCESS, step)
     terminate = b.stepDone(EXCEPTION, step)
     self.assertEqual(terminate, True)
     self.assertEqual(b.result, RETRY)
Пример #16
0
 def testStepDoneRetryOverridesAnythingElse(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [RETRY]
     b.result = RETRY
     b.remote = Mock()
     step = FakeBuildStep()
     step.alwaysRun = True
     b.stepDone(WARNINGS, step)
     b.stepDone(FAILURE, step)
     b.stepDone(SUCCESS, step)
     terminate = b.stepDone(EXCEPTION, step)
     self.assertEqual(terminate, True)
     self.assertEqual(b.result, RETRY)