(self)
| 10 | |
| 11 | @pytest.mark.slow |
| 12 | def test_all(self): |
| 13 | r = self.module.foo([[]]) |
| 14 | assert r == [0] |
| 15 | |
| 16 | r = self.module.foo([[1, 2]]) |
| 17 | assert r == [3] |
| 18 | |
| 19 | r = self.module.foo([[1, 2], [3, 4]]) |
| 20 | assert np.allclose(r, [3, 7]) |
| 21 | |
| 22 | r = self.module.foo([[1, 2], [3, 4], [5, 6]]) |
| 23 | assert np.allclose(r, [3, 7, 11]) |
| 24 | |
| 25 | @pytest.mark.slow |
| 26 | def test_transpose(self): |