fix scatter nd update testcase: index out of range ValueError

This commit is contained in:
zhengzuohe 2023-02-22 16:09:54 +08:00
parent 94bdab39f6
commit ffd58fff8b
1 changed files with 2 additions and 2 deletions

View File

@ -164,7 +164,7 @@ def test_op5(dtype):
"""
Feature: Op ScatterNdUpdate
Description: test ScatterNdUpdate with index out of range
Expectation: raise RuntimeError
Expectation: raise ValueError
"""
class ScatterNdUpdate(nn.Cell):
@ -180,7 +180,7 @@ def test_op5(dtype):
update = Tensor(np.array([[1], [1], [1]], dtype=dtype))
scatter_nd_update = ScatterNdUpdate()
with pytest.raises(RuntimeError):
with pytest.raises(ValueError):
scatter_nd_update(indices, update)