| Conditions | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from unittest import TestCase |
||
| 8 | def test_calculate(self): |
||
| 9 | stage = Mock() |
||
| 10 | tested_object = VelocityCalculator() |
||
| 11 | current_velocities = {stage: [0.5, 0.5]} |
||
| 12 | particle_best_positions = {stage: [0.5, 0.5]} |
||
| 13 | leader_best_positions = {stage: [0.5, 0.5]} |
||
| 14 | control_params = {stage: [0.5, 0.5]} |
||
| 15 | result = tested_object.calculate(current_velocities, |
||
| 16 | particle_best_positions, |
||
| 17 | leader_best_positions, |
||
| 18 | control_params) |
||
| 19 | self.assertIsInstance(result[stage], type([1, 2])) |
||
| 20 | self.assertEquals(len(result), 1) |
||
| 21 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.