Skip to content

Commit

Permalink
add falls back on numpy for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vtavana committed Aug 22, 2023
1 parent 6c2ad26 commit 096857c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dpnp/dpnp_iface_bitwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def left_shift(
>>> np.left_shift(x1, x2)
array([10, 20, 40])
The ``<<`` operator can be used as a shorthand for ``right_shift`` on
The ``<<`` operator can be used as a shorthand for ``left_shift`` on
:class:`dpnp.ndarray`.
>>> x1 << x2
Expand Down Expand Up @@ -437,7 +437,7 @@ def right_shift(
>>> np.right_shift(x1, x2)
array([5, 2, 1])
The ``>>`` operator can be used as a shorthand for ``left_shift`` on
The ``>>`` operator can be used as a shorthand for ``right_shift`` on
:class:`dpnp.ndarray`.
>>> x1 >> x2
Expand Down
1 change: 0 additions & 1 deletion tests/skipped_tests_gpu.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,6 @@ tests/third_party/cupy/math_tests/test_floating.py::TestFloating::test_signbit
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_clip_min_max_none
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_external_clip4
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_absolute_negative
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_sign_negative
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_maximum_nan
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_minimum_nan
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_fmax_nan
Expand Down
2 changes: 2 additions & 0 deletions tests/skipped_tests_gpu_no_fp64.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,8 @@ tests/third_party/cupy/math_tests/test_hyperbolic.py::TestHyperbolic::test_cosh
tests/third_party/cupy/math_tests/test_hyperbolic.py::TestHyperbolic::test_sinh
tests/third_party/cupy/math_tests/test_hyperbolic.py::TestHyperbolic::test_tanh

tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_sign_negative

tests/third_party/cupy/math_tests/test_sumprod.py::TestNansumNanprodLong_param_0_{axis=0, func='nansum', keepdims=True, shape=(2, 3, 4), transpose_axes=True}::test_nansum_all
tests/third_party/cupy/math_tests/test_sumprod.py::TestNansumNanprodLong_param_0_{axis=0, func='nansum', keepdims=True, shape=(2, 3, 4), transpose_axes=True}::test_nansum_axis_transposed
tests/third_party/cupy/math_tests/test_sumprod.py::TestNansumNanprodLong_param_1_{axis=0, func='nansum', keepdims=True, shape=(2, 3, 4), transpose_axes=False}::test_nansum_all
Expand Down
3 changes: 2 additions & 1 deletion tests/test_mathematical.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ def test_negative_boolean():
[[2, 0, -2], [1.1, -1.1]],
ids=["[2, 0, -2]", "[1.1, -1.1]"],
)
@pytest.mark.parametrize("dtype", get_all_dtypes(no_bool=True, no_complex=True))
@pytest.mark.parametrize("dtype", get_all_dtypes(no_bool=True))
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
def test_sign(data, dtype):
np_a = numpy.array(data, dtype=dtype)
dpnp_a = dpnp.array(data, dtype=dtype)
Expand Down
1 change: 1 addition & 0 deletions tests/third_party/cupy/math_tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def test_fabs_negative(self, xp, dtype):
def test_sign(self):
self.check_unary("sign", no_bool=True)

@pytest.mark.usefixtures("allow_fall_back_on_numpy")
def test_sign_negative(self):
self.check_unary_negative("sign", no_bool=True)

Expand Down

0 comments on commit 096857c

Please sign in to comment.