Skip to content

Commit 900251b

Browse files
Use pytest.warns instead of fixure filterwarning
This is better since it assers that warning is issues, and filters it out, so test run of `test_sycl_device.py` is green, rather than darker-yellow.
1 parent 3d79ef9 commit 900251b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpctl/tests/_device_attributes_checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ def check_max_work_item_sizes3d(device):
9090
assert size is not None
9191

9292

93-
@pytest.mark.filterwarnings("DeprecationWarning:")
9493
def check_max_work_item_sizes(device):
95-
max_work_item_sizes = device.max_work_item_sizes
94+
with pytest.warns(DeprecationWarning):
95+
max_work_item_sizes = device.max_work_item_sizes
9696
for size in max_work_item_sizes:
9797
assert size is not None
9898

0 commit comments

Comments
 (0)