| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | """Module for testing grouped optimizer.""" |
||
| 11 | class TestGroupedOptimizer(TestCase): |
||
| 12 | """Class for testing Optimizer.""" |
||
| 13 | |||
| 14 | def setUp(self): |
||
| 15 | """Set up environment.""" |
||
| 16 | self.some_process = AbstractProcess() |
||
| 17 | self.first_stage = AbstractStage() |
||
| 18 | self.second_stage = AbstractStage() |
||
| 19 | self.third_stage_a = Mock() |
||
| 20 | self.third_stage_b = Mock() |
||
| 21 | self.some_process.add_path([self.first_stage, self.second_stage, |
||
|
|
|||
| 22 | self.third_stage_a]) |
||
| 23 | self.some_process.add_edge(self.second_stage, self.third_stage_b) |
||
| 24 | |||
| 25 | def test___init__(self): |
||
| 26 | """Testing creating object.""" |
||
| 27 | optimizer = GroupedOptimizer(self.some_process) |
||
| 28 | self.assertIsNotNone(optimizer) |
||
| 29 | self.assertEqual(optimizer.process, self.some_process) |
||
| 30 | |||
| 31 | def test_calling_functions(self): |
||
| 32 | """Test correct order of calling function.""" |
||
| 33 | optimizer = GroupedOptimizer(self.some_process) |
||
| 34 | |||
| 35 | optimizer.optimize_process() |
||
| 36 |
This check looks for calls to members that are non-existent. These calls will fail.
The member could have been renamed or removed.