Skip to content

Commit 165631c

Browse files
Update test_manipulation
1 parent caf3932 commit 165631c

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

tests/test_manipulation.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
import pytest
2+
from .helper import get_all_dtypes
23
import numpy
34
import dpnp
45

56

7+
dtypes_list = get_all_dtypes(no_none=True, no_complex=True)
68
testdata = []
7-
testdata += [([True, False, True], dtype) for dtype in ['float32', 'float64', 'int32', 'int64', 'bool']]
8-
testdata += [([1, -1, 0], dtype) for dtype in ['float32', 'float64', 'int32', 'int64']]
9-
testdata += [([0.1, 0.0, -0.1], dtype) for dtype in ['float32', 'float64']]
10-
testdata += [([1j, -1j, 1 - 2j], dtype) for dtype in ['complex128']]
9+
testdata += [([True, False, True], dtype) for dtype in dtypes_list]
10+
testdata += [
11+
([1, -1, 0], dtype)
12+
for dtype in dtypes_list
13+
if not numpy.issubdtype(dtype, numpy.bool_)
14+
]
15+
testdata += [
16+
([0.1, 0.0, -0.1], dtype)
17+
for dtype in dtypes_list
18+
if numpy.issubdtype(dtype, numpy.floating)
19+
]
20+
testdata += [
21+
([1j, -1j, 1 - 2j], dtype)
22+
for dtype in ["complex128"]
23+
if numpy.complex128 in get_all_dtypes(no_none=True, no_bool=True)
24+
]
1125

1226

1327
@pytest.mark.parametrize("in_obj,out_dtype", testdata)

0 commit comments

Comments
 (0)