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

Function test_mutate_readonly

deps/pybind11/tests/test_numpy_array.py:130–139  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

128
129
130def test_mutate_readonly(arr):
131 arr.flags.writeable = False
132 for func, args in (
133 (m.mutate_data, ()),
134 (m.mutate_data_t, ()),
135 (m.mutate_at_t, (0, 0)),
136 ):
137 with pytest.raises(ValueError) as excinfo:
138 func(arr, *args)
139 assert str(excinfo.value) == "array is not writeable"
140
141
142def test_mutate_data(arr):

Callers

nothing calls this directly

Calls 2

funcFunction · 0.70
strClass · 0.50

Tested by

no test coverage detected