Skip to content

Commit d1443a1

Browse files
No reason to expected ufunc.types_ to be None.
Example where that assumption is wrong is the following test invocation: ``` python -m pytest \ dpctl/tests/test_tensor_*.py \ dpctl/tests/test_usm_ndarray_*.py \ dpctl/tests/elementwise/test_a*.py ```
1 parent 60591c5 commit d1443a1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dpctl/tests/elementwise/test_abs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_abs_usm_type(usm_type):
7373
def test_abs_types_prop():
7474
get_queue_or_skip()
7575
types = dpt.abs.types_
76-
assert types is None
76+
assert types is None or isinstance(types, list)
7777
types = dpt.abs.types
7878
assert isinstance(types, list)
7979
assert len(types) > 0

dpctl/tests/elementwise/test_add.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def __sycl_usm_array_interface__(self):
261261
def test_add_types_property():
262262
get_queue_or_skip()
263263
types = dpt.add.types_
264-
assert types is None
264+
assert types is None or isinstance(types, list)
265265
types = dpt.add.types
266266
assert isinstance(types, list)
267267
assert len(types) > 0

0 commit comments

Comments
 (0)