diff --git a/dpnp/tests/skipped_tests.tbl b/dpnp/tests/skipped_tests.tbl index be52aaa850f..d7634393ab1 100644 --- a/dpnp/tests/skipped_tests.tbl +++ b/dpnp/tests/skipped_tests.tbl @@ -44,64 +44,3 @@ tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestCubReduction_pa tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestCubReduction_param_6_{order='F', shape=(10, 20, 30)}::test_cub_min tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestCubReduction_param_7_{order='F', shape=(10, 20, 30, 40)}::test_cub_max tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestCubReduction_param_7_{order='F', shape=(10, 20, 30, 40)}::test_cub_min - -tests/third_party/cupy/indexing_tests/test_insert.py::TestPutmaskDifferentDtypes::test_putmask_differnt_dtypes_raises -tests/third_party/cupy/indexing_tests/test_insert.py::TestPutmask::test_putmask_non_equal_shape_raises - -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiter::test_base -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiter::test_copy -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiter::test_copy_next -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiter::test_len -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_0_{index=Ellipsis, shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_0_{index=Ellipsis, shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_0_{index=Ellipsis, shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_0_{index=Ellipsis, shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_0_{index=Ellipsis, shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_3_{index=slice(None, None, None), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_3_{index=slice(None, None, None), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_3_{index=slice(None, None, None), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_3_{index=slice(None, None, None), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_3_{index=slice(None, None, None), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_4_{index=slice(None, 10, None), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_4_{index=slice(None, 10, None), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_4_{index=slice(None, 10, None), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_4_{index=slice(None, 10, None), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_4_{index=slice(None, 10, None), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_5_{index=slice(None, None, 2), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_5_{index=slice(None, None, 2), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_5_{index=slice(None, None, 2), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_5_{index=slice(None, None, 2), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_5_{index=slice(None, None, 2), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_6_{index=slice(None, None, -1), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_6_{index=slice(None, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_6_{index=slice(None, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_6_{index=slice(None, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_6_{index=slice(None, None, -1), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_7_{index=slice(10, None, -1), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_7_{index=slice(10, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_7_{index=slice(10, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_7_{index=slice(10, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_7_{index=slice(10, None, -1), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_8_{index=slice(10, None, -2), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_8_{index=slice(10, None, -2), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_8_{index=slice(10, None, -2), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_8_{index=slice(10, None, -2), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_8_{index=slice(10, None, -2), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_9_{index=slice(None, None, None), shape=()}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_9_{index=slice(None, None, None), shape=()}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_9_{index=slice(None, None, None), shape=()}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_9_{index=slice(None, None, None), shape=()}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_9_{index=slice(None, None, None), shape=()}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_10_{index=slice(None, None, None), shape=(10,)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_10_{index=slice(None, None, None), shape=(10,)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_10_{index=slice(None, None, None), shape=(10,)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_10_{index=slice(None, None, None), shape=(10,)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_10_{index=slice(None, None, None), shape=(10,)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_0_{index=None, shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_0_{index=None, shape=(2, 3, 4)}::test_setitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_1_{index=(0,), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_1_{index=(0,), shape=(2, 3, 4)}::test_setitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_2_{index=True, shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_2_{index=True, shape=(2, 3, 4)}::test_setitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_3_{index=[0], shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_3_{index=[0], shape=(2, 3, 4)}::test_setitem diff --git a/dpnp/tests/skipped_tests_gpu.tbl b/dpnp/tests/skipped_tests_gpu.tbl index 933e72656ff..ddc64c4af8b 100644 --- a/dpnp/tests/skipped_tests_gpu.tbl +++ b/dpnp/tests/skipped_tests_gpu.tbl @@ -53,64 +53,3 @@ tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestCubReduction_pa tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestCubReduction_param_6_{order='F', shape=(10, 20, 30)}::test_cub_min tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestCubReduction_param_7_{order='F', shape=(10, 20, 30, 40)}::test_cub_max tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestCubReduction_param_7_{order='F', shape=(10, 20, 30, 40)}::test_cub_min - -tests/third_party/cupy/indexing_tests/test_insert.py::TestPutmaskDifferentDtypes::test_putmask_differnt_dtypes_raises -tests/third_party/cupy/indexing_tests/test_insert.py::TestPutmask::test_putmask_non_equal_shape_raises - -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiter::test_base -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiter::test_copy -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiter::test_copy_next -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiter::test_len -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_0_{index=Ellipsis, shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_0_{index=Ellipsis, shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_0_{index=Ellipsis, shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_0_{index=Ellipsis, shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_0_{index=Ellipsis, shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_3_{index=slice(None, None, None), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_3_{index=slice(None, None, None), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_3_{index=slice(None, None, None), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_3_{index=slice(None, None, None), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_3_{index=slice(None, None, None), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_4_{index=slice(None, 10, None), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_4_{index=slice(None, 10, None), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_4_{index=slice(None, 10, None), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_4_{index=slice(None, 10, None), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_4_{index=slice(None, 10, None), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_5_{index=slice(None, None, 2), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_5_{index=slice(None, None, 2), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_5_{index=slice(None, None, 2), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_5_{index=slice(None, None, 2), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_5_{index=slice(None, None, 2), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_6_{index=slice(None, None, -1), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_6_{index=slice(None, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_6_{index=slice(None, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_6_{index=slice(None, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_6_{index=slice(None, None, -1), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_7_{index=slice(10, None, -1), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_7_{index=slice(10, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_7_{index=slice(10, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_7_{index=slice(10, None, -1), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_7_{index=slice(10, None, -1), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_8_{index=slice(10, None, -2), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_8_{index=slice(10, None, -2), shape=(2, 3, 4)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_8_{index=slice(10, None, -2), shape=(2, 3, 4)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_8_{index=slice(10, None, -2), shape=(2, 3, 4)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_8_{index=slice(10, None, -2), shape=(2, 3, 4)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_9_{index=slice(None, None, None), shape=()}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_9_{index=slice(None, None, None), shape=()}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_9_{index=slice(None, None, None), shape=()}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_9_{index=slice(None, None, None), shape=()}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_9_{index=slice(None, None, None), shape=()}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_10_{index=slice(None, None, None), shape=(10,)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_10_{index=slice(None, None, None), shape=(10,)}::test_setitem_ndarray_1d -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_10_{index=slice(None, None, None), shape=(10,)}::test_setitem_ndarray_different_types -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_10_{index=slice(None, None, None), shape=(10,)}::test_setitem_ndarray_nd -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscript_param_10_{index=slice(None, None, None), shape=(10,)}::test_setitem_scalar -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_0_{index=None, shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_0_{index=None, shape=(2, 3, 4)}::test_setitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_1_{index=(0,), shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_1_{index=(0,), shape=(2, 3, 4)}::test_setitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_2_{index=True, shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_2_{index=True, shape=(2, 3, 4)}::test_setitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_3_{index=[0], shape=(2, 3, 4)}::test_getitem -tests/third_party/cupy/indexing_tests/test_iterate.py::TestFlatiterSubscriptIndexError_param_3_{index=[0], shape=(2, 3, 4)}::test_setitem diff --git a/dpnp/tests/third_party/cupy/indexing_tests/test_generate.py b/dpnp/tests/third_party/cupy/indexing_tests/test_generate.py index 61d7bf83ac2..52683ee6a9b 100644 --- a/dpnp/tests/third_party/cupy/indexing_tests/test_generate.py +++ b/dpnp/tests/third_party/cupy/indexing_tests/test_generate.py @@ -8,6 +8,7 @@ class TestIndices(unittest.TestCase): + @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_indices_list0(self, xp, dtype): @@ -31,6 +32,7 @@ def test_indices_list3(self): class TestIX_(unittest.TestCase): + @pytest.mark.skip("List input is not supported") @testing.numpy_cupy_array_equal() def test_ix_list(self, xp): @@ -52,6 +54,7 @@ def test_ix_bool_ndarray(self, xp): @pytest.mark.skip("r_[] is not supported yet") class TestR_(unittest.TestCase): + @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_r_1(self, xp, dtype): @@ -113,6 +116,7 @@ def test_r_scalars(self, xp): @pytest.mark.skip("c_[] is not supported yet") class TestC_(unittest.TestCase): + @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_c_1(self, xp, dtype): @@ -138,6 +142,7 @@ def test_c_3(self, dtype): @pytest.mark.skip("no AxisConcatenator is provided") class TestAxisConcatenator(unittest.TestCase): + def test_AxisConcatenator_init1(self): with self.assertRaises(TypeError): generate.AxisConcatenator.__init__() @@ -148,6 +153,7 @@ def test_len(self): class TestUnravelIndex(unittest.TestCase): + @testing.for_orders(["C", "F", None]) @testing.for_int_dtypes() @testing.numpy_cupy_array_equal(type_check=False) @@ -182,6 +188,7 @@ def test_invalid_dtype(self, order, dtype): class TestRavelMultiIndex(unittest.TestCase): + @testing.for_orders(["C", "F", None]) @testing.for_int_dtypes() @testing.numpy_cupy_array_equal() @@ -288,6 +295,7 @@ def test_invalid_mode(self, dtype): class TestMaskIndices: + @testing.numpy_cupy_array_equal() def test_mask_indices(self, xp): # arr is a square matrix with 50% density @@ -305,6 +313,7 @@ def test_empty(self, xp): class TestTrilIndices: + @testing.numpy_cupy_array_equal() def test_tril_indices_1(self, xp): return xp.tril_indices(n=29, k=0) @@ -330,6 +339,7 @@ def test_tril_indices(self, dtype): class TestTrilIndicesForm: + @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_tril_indices_from_1(self, xp, dtype): @@ -356,6 +366,7 @@ def test_tril_indices_from_4(self, dtype): class TestTriuIndices: + @testing.numpy_cupy_array_equal() def test_triu_indices_1(self, xp): return xp.triu_indices(n=10, k=0) @@ -381,6 +392,7 @@ def test_triu_indices_4(self, dtype): class TestTriuIndicesFrom: + @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_triu_indices_from_1(self, xp, dtype): diff --git a/dpnp/tests/third_party/cupy/indexing_tests/test_indexing.py b/dpnp/tests/third_party/cupy/indexing_tests/test_indexing.py index 4e858cb0acd..a977b44bbdb 100644 --- a/dpnp/tests/third_party/cupy/indexing_tests/test_indexing.py +++ b/dpnp/tests/third_party/cupy/indexing_tests/test_indexing.py @@ -9,6 +9,7 @@ class TestIndexing(unittest.TestCase): + @testing.numpy_cupy_array_equal() def test_take_by_scalar(self, xp): a = testing.shaped_arange((2, 4, 3), xp) @@ -199,6 +200,7 @@ def test_extract_empty_1dim(self, xp): class TestChoose(unittest.TestCase): + @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_choose(self, xp, dtype): @@ -265,6 +267,8 @@ def test_choose_broadcast_fail(self, dtype): class TestSelect(unittest.TestCase): + + @testing.with_requires("numpy>=2.0") @testing.for_all_dtypes(no_bool=True, no_complex=True) @testing.numpy_cupy_array_equal() def test_select(self, xp, dtype): @@ -273,6 +277,7 @@ def test_select(self, xp, dtype): choicelist = [a, a**2] return xp.select(condlist, choicelist) + @testing.with_requires("numpy>=2.0") @testing.for_complex_dtypes() @testing.numpy_cupy_array_almost_equal() def test_select_complex(self, xp, dtype): @@ -281,6 +286,7 @@ def test_select_complex(self, xp, dtype): choicelist = [a, a**2] return xp.select(condlist, choicelist) + @testing.with_requires("numpy>=2.0") @testing.for_all_dtypes(no_bool=True, no_complex=True) @testing.numpy_cupy_array_equal() def test_select_default(self, xp, dtype): @@ -290,6 +296,7 @@ def test_select_default(self, xp, dtype): default = 3 return xp.select(condlist, choicelist, default) + @testing.with_requires("numpy>=2.0") @testing.for_complex_dtypes() @testing.numpy_cupy_array_almost_equal() def test_select_default_complex(self, xp, dtype): @@ -299,6 +306,7 @@ def test_select_default_complex(self, xp, dtype): default = 3 return xp.select(condlist, choicelist, default) + @testing.with_requires("numpy>=2.0") @testing.for_all_dtypes(no_bool=True, no_complex=True) @testing.numpy_cupy_array_equal() def test_select_odd_shaped_broadcastable(self, xp, dtype): @@ -308,6 +316,7 @@ def test_select_odd_shaped_broadcastable(self, xp, dtype): choicelist = [a, b] return xp.select(condlist, choicelist) + @testing.with_requires("numpy>=2.0") @testing.for_complex_dtypes() @testing.numpy_cupy_allclose(rtol=1e-5) def test_select_odd_shaped_broadcastable_complex(self, xp, dtype): @@ -326,6 +335,7 @@ def test_select_1D_choicelist(self, xp, dtype): choicelist = [a, b] return xp.select(condlist, choicelist) + @testing.with_requires("numpy>=2.0") @testing.for_all_dtypes(no_bool=True) @testing.numpy_cupy_array_equal() def test_select_choicelist_condlist_broadcast(self, xp, dtype): diff --git a/dpnp/tests/third_party/cupy/indexing_tests/test_insert.py b/dpnp/tests/third_party/cupy/indexing_tests/test_insert.py index a60957108c0..f3edc5cadc8 100644 --- a/dpnp/tests/third_party/cupy/indexing_tests/test_insert.py +++ b/dpnp/tests/third_party/cupy/indexing_tests/test_insert.py @@ -16,6 +16,7 @@ ) ) class TestPlace(unittest.TestCase): + # NumPy 1.9 don't wraps values. # https://github.com/numpy/numpy/pull/5821 @testing.for_all_dtypes() @@ -39,6 +40,7 @@ def test_place(self, xp, dtype): ) ) class TestPlaceRaises(unittest.TestCase): + # NumPy 1.9 performs illegal memory access. # https://github.com/numpy/numpy/pull/5821 @testing.with_requires("numpy>=1.10") @@ -74,6 +76,7 @@ def test_place_shape_unmatch_error(self, dtype): ) ) class TestPut(unittest.TestCase): + @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_put(self, xp, dtype): @@ -101,6 +104,7 @@ def test_put(self, xp, dtype): ) ) class TestPutScalars(unittest.TestCase): + @testing.numpy_cupy_array_equal() def test_put_index_scalar(self, xp): dtype = cupy.float32 @@ -130,6 +134,7 @@ def test_put_values_scalar(self, xp): ) ) class TestPutRaises(unittest.TestCase): + @pytest.mark.skip("'raise' mode is not supported") @testing.for_all_dtypes() def test_put_inds_underflow_error(self, dtype): @@ -165,6 +170,7 @@ def test_put_mode_error(self, dtype): *testing.product({"shape": [(0,), (1,), (2, 3), (2, 3, 4)]}) ) class TestPutmaskSameShape(unittest.TestCase): + @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_putmask(self, xp, dtype): @@ -185,6 +191,7 @@ def test_putmask(self, xp, dtype): ) ) class TestPutmaskDifferentShapes(unittest.TestCase): + @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_putmask(self, xp, dtype): @@ -200,6 +207,7 @@ def test_putmask(self, xp, dtype): @pytest.mark.usefixtures("allow_fall_back_on_numpy") class TestPutmask(unittest.TestCase): + @testing.numpy_cupy_array_equal() def test_putmask_scalar_values(self, xp): shape = (2, 3) @@ -211,7 +219,7 @@ def test_putmask_non_equal_shape_raises(self): for xp in (numpy, cupy): a = xp.array([1, 2, 3]) mask = xp.array([True, False]) - with pytest.raises(ValueError): + with pytest.raises((ValueError, IndexError)): xp.putmask(a, mask, a**2) @testing.numpy_cupy_array_equal() @@ -223,6 +231,8 @@ def test_putmask_int_mask_scalar_values(self, xp): class TestPutmaskDifferentDtypes(unittest.TestCase): + + @pytest.mark.skip("putmask() is not fully supported") @testing.for_all_dtypes_combination(names=["a_dtype", "val_dtype"]) def test_putmask_differnt_dtypes_raises(self, a_dtype, val_dtype): shape = (2, 3) @@ -255,6 +265,7 @@ def test_putmask_differnt_dtypes_mask(self, xp, dtype): ) ) class TestFillDiagonal(unittest.TestCase): + def _compute_val(self, xp): if type(self.val) is int: return self.val @@ -299,6 +310,7 @@ def test_1darray(self, dtype): ) ) class TestDiagIndices(unittest.TestCase): + @testing.numpy_cupy_array_equal() def test_diag_indices(self, xp): return xp.diag_indices(self.n, self.ndim) @@ -313,6 +325,7 @@ def test_diag_indices(self, xp): ) ) class TestDiagIndicesInvalidValues(unittest.TestCase): + @testing.numpy_cupy_array_equal() def test_diag_indices(self, xp): return xp.diag_indices(self.n, self.ndim) @@ -326,6 +339,7 @@ def test_diag_indices(self, xp): ) ) class TestDiagIndicesFrom(unittest.TestCase): + @testing.numpy_cupy_array_equal() def test_diag_indices_from(self, xp): arr = testing.shaped_arange(self.shape, xp) @@ -340,6 +354,7 @@ def test_diag_indices_from(self, xp): ) ) class TestDiagIndicesFromRaises(unittest.TestCase): + def test_non_equal_dims(self): for xp in (numpy, cupy): arr = testing.shaped_arange(self.shape, xp) diff --git a/dpnp/tests/third_party/cupy/indexing_tests/test_iterate.py b/dpnp/tests/third_party/cupy/indexing_tests/test_iterate.py index 0c18b775982..f68af146dd6 100644 --- a/dpnp/tests/third_party/cupy/indexing_tests/test_iterate.py +++ b/dpnp/tests/third_party/cupy/indexing_tests/test_iterate.py @@ -14,6 +14,8 @@ class TestFlatiter(unittest.TestCase): + + @pytest.mark.skip("no base attribute") def test_base(self): for xp in (numpy, cupy): a = xp.zeros((2, 3, 4)) @@ -31,12 +33,14 @@ def test_next(self): for ai, ei in zip(a.flat, e): assert ai == ei + @pytest.mark.skip("no len() method") def test_len(self): for xp in (numpy, cupy): a = xp.zeros((2, 3, 4)) assert len(a.flat) == 24 assert len(a[::2].flat) == 12 + @pytest.mark.skip("no copy attribute") @testing.numpy_cupy_array_equal() def test_copy(self, xp): a = testing.shaped_arange((2, 3, 4), xp) @@ -44,6 +48,7 @@ def test_copy(self, xp): assert a is not o return a.flat.copy() + @pytest.mark.skip("no copy attribute") @testing.numpy_cupy_array_equal() def test_copy_next(self, xp): a = testing.shaped_arange((2, 3, 4), xp) @@ -53,19 +58,20 @@ def test_copy_next(self, xp): @testing.parameterize( - {"shape": (2, 3, 4), "index": Ellipsis}, + # {"shape": (2, 3, 4), "index": Ellipsis}, {"shape": (2, 3, 4), "index": 0}, {"shape": (2, 3, 4), "index": 10}, - {"shape": (2, 3, 4), "index": slice(None)}, - {"shape": (2, 3, 4), "index": slice(None, 10)}, - {"shape": (2, 3, 4), "index": slice(None, None, 2)}, - {"shape": (2, 3, 4), "index": slice(None, None, -1)}, - {"shape": (2, 3, 4), "index": slice(10, None, -1)}, - {"shape": (2, 3, 4), "index": slice(10, None, -2)}, - {"shape": (), "index": slice(None)}, - {"shape": (10,), "index": slice(None)}, + # {"shape": (2, 3, 4), "index": slice(None)}, + # {"shape": (2, 3, 4), "index": slice(None, 10)}, + # {"shape": (2, 3, 4), "index": slice(None, None, 2)}, + # {"shape": (2, 3, 4), "index": slice(None, None, -1)}, + # {"shape": (2, 3, 4), "index": slice(10, None, -1)}, + # {"shape": (2, 3, 4), "index": slice(10, None, -2)}, + # {"shape": (), "index": slice(None)}, + # {"shape": (10,), "index": slice(None)}, ) class TestFlatiterSubscript(unittest.TestCase): + @testing.for_CF_orders() @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() @@ -121,11 +127,12 @@ def test_setitem_ndarray_different_types(self, xp, a_dtype, v_dtype, order): {"shape": (2, 3, 4), "index": None}, {"shape": (2, 3, 4), "index": (0,)}, {"shape": (2, 3, 4), "index": True}, - # printing behaviour of dpnp_array ('index') makes imposibble to skip this test - # {'shape': (2, 3, 4), 'index': cupy.array([0])}, + {"shape": (2, 3, 4), "index": cupy.array([0])}, {"shape": (2, 3, 4), "index": [0]}, ) +@pytest.mark.skip("no exception raised") class TestFlatiterSubscriptIndexError(unittest.TestCase): + @testing.for_all_dtypes() def test_getitem(self, dtype): a = testing.shaped_arange(self.shape, cupy, dtype)