| 193 | |
| 194 | |
| 195 | def test_bounds_check(arr): |
| 196 | for func in ( |
| 197 | m.index_at, |
| 198 | m.index_at_t, |
| 199 | m.data, |
| 200 | m.data_t, |
| 201 | m.mutate_data, |
| 202 | m.mutate_data_t, |
| 203 | m.at_t, |
| 204 | m.mutate_at_t, |
| 205 | ): |
| 206 | with pytest.raises(IndexError) as excinfo: |
| 207 | func(arr, 2, 0) |
| 208 | assert str(excinfo.value) == "index 2 is out of bounds for axis 0 with size 2" |
| 209 | with pytest.raises(IndexError) as excinfo: |
| 210 | func(arr, 0, 4) |
| 211 | assert str(excinfo.value) == "index 4 is out of bounds for axis 1 with size 3" |
| 212 | |
| 213 | |
| 214 | def test_make_c_f_array(): |