| 23 | |
| 24 | @pytest.mark.parametrize("Value, IR, IL", test_data) |
| 25 | def test_allc(Value, IR, IL): |
| 26 | S_ref = [ |
| 27 | np.array([1, 7, 11], dtype=np.int64), |
| 28 | np.array([0], dtype=np.int64), |
| 29 | np.array([3], dtype=np.int64), |
| 30 | np.array([9], dtype=np.int64), |
| 31 | np.array([2, 4, 6, 8, 10], dtype=np.int64), |
| 32 | np.array([5], dtype=np.int64), |
| 33 | ] |
| 34 | C_ref = np.array([2, 4, 6, 8, 10], dtype=np.int64) |
| 35 | S_comp, C_comp = allc(IL, IR) |
| 36 | |
| 37 | S_ref = sorted(S_ref, key=lambda x: (len(x), list(x))) |
| 38 | S_comp = sorted(S_comp, key=lambda x: (len(x), list(x))) |
| 39 | |
| 40 | npt.assert_equal(S_ref, S_comp) |
| 41 | npt.assert_equal(C_ref, C_comp) |