Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions dpnp/tests/third_party/cupy/core_tests/test_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ def test_two(self):

class TestGetSize:

def test_none(self):
with testing.assert_warns(DeprecationWarning):
assert internal.get_size(None) == ()

def check_collection(self, a):
assert internal.get_size(a) == tuple(a)

Expand Down
7 changes: 3 additions & 4 deletions dpnp/tests/third_party/cupy/core_tests/test_ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ def wrap_take(array, *args, **kwargs):


class TestNdarrayInit(unittest.TestCase):
@pytest.mark.skip("passing 'None' into shape arguments is not supported")

def test_shape_none(self):
with testing.assert_warns(DeprecationWarning):
a = cupy.ndarray(None)
assert a.shape == ()
with pytest.raises(TypeError):
cupy.ndarray(None)

def test_shape_int(self):
a = cupy.ndarray(3)
Expand Down
24 changes: 10 additions & 14 deletions dpnp/tests/third_party/cupy/creation_tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,13 @@ def test_empty_scalar(self, xp, dtype, order):
a.fill(0)
return a

@pytest.mark.skip("passing 'None' into shape arguments is not supported")
@testing.with_requires("numpy>=1.20")
@testing.with_requires("numpy>=2.3")
@testing.for_CF_orders()
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
def test_empty_scalar_none(self, xp, dtype, order):
with testing.assert_warns(DeprecationWarning):
a = xp.empty(None, dtype=dtype, order=order)
a.fill(0)
return a
def test_empty_scalar_none(self, dtype, order):
for xp in (numpy, cupy):
with pytest.raises(TypeError):
xp.empty(None, dtype=dtype, order=order)

@testing.for_CF_orders()
@testing.for_all_dtypes()
Expand Down Expand Up @@ -206,14 +203,13 @@ def test_zeros(self, xp, dtype, order):
def test_zeros_scalar(self, xp, dtype, order):
return xp.zeros((), dtype=dtype, order=order)

@pytest.mark.skip("passing 'None' into shape arguments is not supported")
@testing.with_requires("numpy>=1.20")
@testing.with_requires("numpy>=2.3")
@testing.for_CF_orders()
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
def test_zeros_scalar_none(self, xp, dtype, order):
with testing.assert_warns(DeprecationWarning):
return xp.zeros(None, dtype=dtype, order=order)
def test_zeros_scalar_none(self, dtype, order):
for xp in (numpy, cupy):
with pytest.raises(TypeError):
xp.zeros(None, dtype=dtype, order=order)

@testing.for_CF_orders()
@testing.for_all_dtypes()
Expand Down
Loading