Skip to content

Commit 6710946

Browse files
Use pytest.warns in test_lsplatform3
This was test suite passes even with ``-W error::UserWarning``
1 parent 227a126 commit 6710946

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dpctl/tests/test_sycl_platform.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ def test_lsplatform2():
156156

157157
def test_lsplatform3():
158158
try:
159-
dpctl.lsplatform(3)
159+
with pytest.warns(UserWarning):
160+
dpctl.lsplatform(3)
160161
except Exception:
161162
pytest.fail("Encountered an exception inside lsplatform().")
162163

0 commit comments

Comments
 (0)