示例#1
0
 def test_fail_retry(self):
     t = Task(name='task', retry=3)
     t.fail()
     self.assertEqual(t.status, 'new')
     t.fail()
     self.assertEqual(t.status, 'new')
     t.fail()
     self.assertEqual(t.status, 'new')
     t.fail()
     self.assertEqual(t.status, 'failed')
示例#2
0
 def test_fail(self):
     t = Task(name='task')
     t.fail()
     self.assertEqual(t.status, 'failed')