| Total Complexity | 1 |
| Total Lines | 11 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """Tests for pyswarm.""" |
||
| 6 | class TestPso(TestCase): |
||
| 7 | """Class for tests pyswarm.""" |
||
| 8 | |||
| 9 | def test_run_simple_pso(self): |
||
| 10 | """Test running library.""" |
||
| 11 | lower_bound = [-3, -1] |
||
| 12 | upper_bound = [2, 6] |
||
| 13 | |||
| 14 | x_opt, f_opt = pso(myfunc, lower_bound, upper_bound) |
||
| 15 | self.assertIsNotNone(x_opt) |
||
| 16 | self.assertIsNotNone(f_opt) |
||
| 17 | |||
| 31 |
This happens when the amount of values does not equal the amount of labels: