MCPcopy Create free account
hub / github.com/apple/coremltools / test_at_fail

Function test_at_fail

deps/pybind11/tests/test_numpy_array.py:115–119  ·  view source on GitHub ↗
(arr, dim)

Source from the content-addressed store, hash-verified

113
114@pytest.mark.parametrize("dim", [0, 1, 3])
115def test_at_fail(arr, dim):
116 for func in m.at_t, m.mutate_at_t:
117 with pytest.raises(IndexError) as excinfo:
118 func(arr, *([0] * dim))
119 assert str(excinfo.value) == f"index dimension mismatch: {dim} (ndim = 2)"
120
121
122def test_at(arr):

Callers

nothing calls this directly

Calls 2

funcFunction · 0.70
strClass · 0.50

Tested by

no test coverage detected