From 6710946a2c0baac91479ba587c2a325e5f876bbe Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Wed, 23 Jun 2021 09:33:12 -0500 Subject: [PATCH] Use pytest.warns in test_lsplatform3 This was test suite passes even with ``-W error::UserWarning`` --- dpctl/tests/test_sycl_platform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dpctl/tests/test_sycl_platform.py b/dpctl/tests/test_sycl_platform.py index 188c03ebbc..cf4b5bf59c 100644 --- a/dpctl/tests/test_sycl_platform.py +++ b/dpctl/tests/test_sycl_platform.py @@ -156,7 +156,8 @@ def test_lsplatform2(): def test_lsplatform3(): try: - dpctl.lsplatform(3) + with pytest.warns(UserWarning): + dpctl.lsplatform(3) except Exception: pytest.fail("Encountered an exception inside lsplatform().")