| Conditions | 3 |
| Total Lines | 16 |
| Lines | 16 |
| Ratio | 100 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | # coding: utf8 |
||
| 23 | View Code Duplication | def test_failure_in_middle(self): |
|
|
|
|||
| 24 | a = self._action("a") |
||
| 25 | b = self._action("b", exception=Exception()) |
||
| 26 | c = self._action("c") |
||
| 27 | a.add_dependency(b) |
||
| 28 | b.add_dependency(c) |
||
| 29 | |||
| 30 | for i in range(self.REPEAT): |
||
| 31 | with self.assertRaises(CompoundException) as catcher: |
||
| 32 | execute(a) |
||
| 33 | report = catcher.exception.execution_report |
||
| 34 | self.assertEqual(report.get_action_status(a).status, ExecutionReport.ActionStatus.Canceled) |
||
| 35 | self.assertEqual(report.get_action_status(b).status, ExecutionReport.ActionStatus.Failed) |
||
| 36 | self.assertEqual(report.get_action_status(c).status, ExecutionReport.ActionStatus.Successful) |
||
| 37 | |||
| 38 | self.assertEventsEqual("c b " * self.REPEAT) |
||
| 39 |