Skip to content

Commit 64308f0

Browse files
committed
Update test with ufunc signature to be passed on Windows
1 parent 567604f commit 64308f0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dpnp/tests/third_party/cupy/core_tests/test_ndarray_ufunc.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import pytest
55

66
import dpnp as cupy
7+
from dpnp.tests.helper import is_win_platform
78
from dpnp.tests.third_party.cupy import testing
89

910

@@ -193,16 +194,19 @@ class TestUfunc:
193194
)
194195
@testing.numpy_cupy_equal()
195196
def test_types(self, xp, ufunc):
197+
# CuPy does not support the following dtypes:
198+
# longlong, (c)longdouble, datetime, timedelta, and object.
199+
excl_types = "GgMmO"
200+
excl_types += "Ii" if is_win_platform() else "Qq"
201+
196202
types = getattr(xp, ufunc).types
197203
if xp == numpy:
198204
assert isinstance(types, list)
199205
types = list(
200206
dict.fromkeys( # remove dups: numpy/numpy#7897
201207
sig
202208
for sig in types
203-
# CuPy does not support the following dtypes:
204-
# longlong, (c)longdouble, datetime, timedelta, and object.
205-
if not any(t in sig for t in "QqGgMmO")
209+
if not any(t in sig for t in excl_types)
206210
)
207211
)
208212
return types

0 commit comments

Comments
 (0)