示例#1
0
 def test_update_result_failure(self):
     result = ProcessResult('tox')
     result.out = 'Oh snap'
     result.return_code = 1
     failure = Result('tox')
     failure.update_result(result)
     self.assertFalse(failure.succeeded)
     self.assertEquals(failure.log, 'Oh snap')
     self.assertEquals(failure.task, 'tox')
示例#2
0
 def test_update_result_success(self):
     result = ProcessResult('tox')
     result.out = 'Success'
     result.return_code = 0
     success = Result('tox')
     success.update_result(result)
     self.assertTrue(success.succeeded)
     self.assertEquals(success.log, 'Success')
     self.assertEquals(success.task, 'tox')