Skip to content

Commit 49f684b

Browse files
committed
Allow RuntimeError in test_boolean_assignment_value_mismatch
1 parent 18f4f23 commit 49f684b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

torch_np/tests/numpy_tests/core/test_indexing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ def test_boolean_assignment_value_mismatch(self):
241241
def f(a, v):
242242
a[a > -1] = v
243243

244-
assert_raises(ValueError, f, a, [])
245-
assert_raises(ValueError, f, a, [1, 2, 3])
246-
assert_raises(ValueError, f, a[:1], [1, 2, 3])
244+
assert_raises((ValueError, RuntimeError), f, a, [])
245+
assert_raises((ValueError, RuntimeError), f, a, [1, 2, 3])
246+
assert_raises((ValueError, RuntimeError), f, a[:1], [1, 2, 3])
247247

248248
def test_boolean_assignment_needs_api(self):
249249
# See also gh-7666

0 commit comments

Comments
 (0)