Skip to content

Commit

Permalink
Revert skipping test_fill_with_numpy_scalar_ndarray
Browse files Browse the repository at this point in the history
Instead now accepts `ValueError` and `TypeError` in addition to `ComplexWarning`
  • Loading branch information
ndgrigorian committed Sep 18, 2024
1 parent c36cf72 commit ef96194
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,19 @@ def test_fill(self, xp, dtype):
a.fill(1)
return a

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

@testing.with_requires("numpy>=1.24.0")
@testing.for_all_dtypes_combination(("dtype1", "dtype2"))
@testing.numpy_cupy_array_equal(accept_error=ComplexWarning)
@testing.numpy_cupy_array_equal(
accept_error=(ValueError, TypeError, ComplexWarning)
)
def test_fill_with_cupy_scalar_ndarray(self, xp, dtype1, dtype2):
a = testing.shaped_arange((2, 3, 4), xp, dtype1)
b = xp.ones((), dtype=dtype2)
Expand Down

0 comments on commit ef96194

Please sign in to comment.