Skip to content

Enable the whole scope of indexing tests in public CI #2049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 16, 2024
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
3 changes: 1 addition & 2 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ env:
third_party/cupy/core_tests
third_party/cupy/fft_tests
third_party/cupy/creation_tests
third_party/cupy/indexing_tests/test_indexing.py
third_party/cupy/indexing_tests/test_generate.py
third_party/cupy/indexing_tests
third_party/cupy/lib_tests
third_party/cupy/linalg_tests
third_party/cupy/logic_tests
Expand Down
15 changes: 0 additions & 15 deletions tests/skipped_tests.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,6 @@ tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestCubReduction_pa
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_generate.py::TestAxisConcatenator::test_AxisConcatenator_init1
tests/third_party/cupy/indexing_tests/test_generate.py::TestAxisConcatenator::test_len
tests/third_party/cupy/indexing_tests/test_generate.py::TestC_::test_c_1
tests/third_party/cupy/indexing_tests/test_generate.py::TestC_::test_c_2
tests/third_party/cupy/indexing_tests/test_generate.py::TestC_::test_c_3
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_1
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_2
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_3
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_4
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_5
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_6
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_7
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_8
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_9

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

Expand Down
15 changes: 0 additions & 15 deletions tests/skipped_tests_gpu.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,6 @@ tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestCubReduction_pa
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_generate.py::TestAxisConcatenator::test_AxisConcatenator_init1
tests/third_party/cupy/indexing_tests/test_generate.py::TestAxisConcatenator::test_len
tests/third_party/cupy/indexing_tests/test_generate.py::TestC_::test_c_1
tests/third_party/cupy/indexing_tests/test_generate.py::TestC_::test_c_2
tests/third_party/cupy/indexing_tests/test_generate.py::TestC_::test_c_3
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_1
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_2
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_3
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_4
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_5
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_6
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_7
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_8
tests/third_party/cupy/indexing_tests/test_generate.py::TestR_::test_r_9

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

Expand Down
28 changes: 16 additions & 12 deletions tests/third_party/cupy/indexing_tests/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def test_indices_list1(self, xp, dtype):
def test_indices_list2(self, xp, dtype):
return xp.indices((1, 2, 3, 4), dtype)

@testing.with_requires("numpy>=1.24")
def test_indices_list3(self):
for xp in (numpy, cupy):
with pytest.raises((ValueError, TypeError)):
Expand All @@ -49,6 +50,7 @@ def test_ix_bool_ndarray(self, xp):
return xp.ix_(xp.array([True, False] * 2))


@pytest.mark.skip("r_[] is not supported yet")
class TestR_(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
Expand All @@ -66,7 +68,9 @@ def test_r_8(self, xp, dtype):
return xp.r_[a, b, c]

@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
@testing.numpy_cupy_array_equal(
type_check=(numpy.lib.NumpyVersion(numpy.__version__) >= "1.25.0")
)
def test_r_2(self, xp, dtype):
a = xp.array([1, 2, 3], dtype)
return xp.r_[a, 0, 0, a]
Expand Down Expand Up @@ -100,7 +104,14 @@ def test_r_9(self, dtype):
with self.assertRaises(ValueError):
cupy.r_[a, b]

@testing.numpy_cupy_array_equal(
type_check=(numpy.lib.NumpyVersion(numpy.__version__) >= "1.25.0")
)
def test_r_scalars(self, xp):
return xp.r_[0, 0.5, -1, 0.3]


@pytest.mark.skip("c_[] is not supported yet")
class TestC_(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
Expand All @@ -125,14 +136,15 @@ def test_c_3(self, dtype):
cupy.c_[a, b]


@pytest.mark.skip("no AxisConcatenator is provided")
class TestAxisConcatenator(unittest.TestCase):
def test_AxisConcatenator_init1(self):
with self.assertRaises(TypeError):
generate.AxisConcatenator.__init__()

def test_len(self):
a = generate.AxisConcatenator()
self.assertEqual(len(a), 0)
assert len(a) == 0


class TestUnravelIndex(unittest.TestCase):
Expand Down Expand Up @@ -339,11 +351,7 @@ def test_tril_indices_from_3(self, xp, dtype):
@testing.for_all_dtypes()
def test_tril_indices_from_4(self, dtype):
for xp in (numpy, cupy):
if xp is numpy:
error = AttributeError
else:
error = TypeError
with pytest.raises(error):
with pytest.raises((AttributeError, TypeError)):
xp.tril_indices_from(4, k=1)


Expand Down Expand Up @@ -394,9 +402,5 @@ def test_triu_indices_from_3(self, xp, dtype):
@testing.for_all_dtypes()
def test_triu_indices_from_4(self, dtype):
for xp in (numpy, cupy):
if xp is numpy:
error = AttributeError
else:
error = TypeError
with pytest.raises(error):
with pytest.raises((AttributeError, TypeError)):
xp.triu_indices_from(4, k=1)
Loading