Skip to content

Commit ef96194

Browse files
committed
Revert skipping test_fill_with_numpy_scalar_ndarray
Instead now accepts `ValueError` and `TypeError` in addition to `ComplexWarning`
1 parent c36cf72 commit ef96194

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,18 +274,19 @@ def test_fill(self, xp, dtype):
274274
a.fill(1)
275275
return a
276276

277-
@pytest.mark.skip(
278-
"asynchronous fill does not allow numpy scalar array for consistency"
279-
"with dpnp.fill_diagonal"
280-
)
277+
@testing.with_requires("numpy>=1.24.0")
278+
@testing.for_all_dtypes_combination(("dtype1", "dtype2"))
279+
@testing.numpy_cupy_array_equal(accept_error=ComplexWarning)
281280
def test_fill_with_numpy_scalar_ndarray(self, xp, dtype1, dtype2):
282281
a = testing.shaped_arange((2, 3, 4), xp, dtype1)
283282
a.fill(numpy.ones((), dtype=dtype2))
284283
return a
285284

286285
@testing.with_requires("numpy>=1.24.0")
287286
@testing.for_all_dtypes_combination(("dtype1", "dtype2"))
288-
@testing.numpy_cupy_array_equal(accept_error=ComplexWarning)
287+
@testing.numpy_cupy_array_equal(
288+
accept_error=(ValueError, TypeError, ComplexWarning)
289+
)
289290
def test_fill_with_cupy_scalar_ndarray(self, xp, dtype1, dtype2):
290291
a = testing.shaped_arange((2, 3, 4), xp, dtype1)
291292
b = xp.ones((), dtype=dtype2)

0 commit comments

Comments
 (0)