Skip to content

Commit 9209861

Browse files
rwgkmdboom
andauthored
Fix #1531 (remove stray skip_reasons code) (#1532)
* Fix #1531 and slightly enhance skip reporting Deduplicate root-only devices while preserving order. * Simplify test --------- Co-authored-by: Michael Droettboom <mdboom@gmail.com>
1 parent 9f7b89a commit 9209861

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cuda_bindings/tests/nvml/test_compute_mode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ def test_compute_mode_supported_nonroot(all_devices):
2626
try:
2727
nvml.device_set_compute_mode(device, cm)
2828
except nvml.NoPermissionError:
29-
skip_reasons.add(f"nvmlDeviceSetComputeMode requires root for device {device}")
30-
continue
29+
pytest.skip("Insufficient permissions to set compute mode")
30+
nvml.device_set_compute_mode(device, original_compute_mode)
3131
assert original_compute_mode == nvml.device_get_compute_mode(device), "Compute mode shouldn't have changed"

0 commit comments

Comments
 (0)