Skip to content

Commit 4b472a6

Browse files
Make tests invoke get_usm_type_enum
1 parent 567d5cb commit 4b472a6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

dpctl/tests/test_sycl_usm.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,13 @@ def test_create_with_size_and_alignment(memory_ctor):
270270
not has_sycl_platforms(),
271271
reason="No SYCL devices except the default host device.",
272272
)
273-
def test_create_with_only_size(memory_ctor):
274-
m = memory_ctor(1024)
273+
def test_usm_type_execeptions():
274+
m = MemoryUSMDevice(1024)
275275
assert m.nbytes == 1024
276-
assert m.get_usm_type() == expected_usm_type_str(memory_ctor)
277-
assert m.get_usm_type_enum() == expected_usm_type_enum(memory_ctor)
276+
with pytest.raises(TypeError):
277+
m.get_usm_type(syclobj=Ellipsis)
278+
with pytest.raises(TypeError):
279+
m.get_usm_type_enum(syclobj=list())
278280

279281

280282
@pytest.mark.skipif(

0 commit comments

Comments
 (0)