From bb1d5793d61615ea96ed746c15a415c6885a5e2e Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 29 Jan 2026 10:30:28 -0500 Subject: [PATCH] Improve 2 NVML-related tests --- cuda_bindings/tests/nvml/test_gpu.py | 2 +- cuda_core/tests/system/test_system_device.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cuda_bindings/tests/nvml/test_gpu.py b/cuda_bindings/tests/nvml/test_gpu.py index 52c5dc52fb..6d2c9d2ec7 100644 --- a/cuda_bindings/tests/nvml/test_gpu.py +++ b/cuda_bindings/tests/nvml/test_gpu.py @@ -35,7 +35,7 @@ def test_gpu_get_platform_info(all_devices): with unsupported_before(device, None): platform_info = nvml.device_get_platform_info(device) - assert isinstance(platform_info, nvml.PlatformInfo_v2) + assert isinstance(platform_info, (nvml.PlatformInfo_v1, nvml.PlatformInfo_v2)) # TODO: Test APIs related to GPU instances, which require specific hardware and root diff --git a/cuda_core/tests/system/test_system_device.py b/cuda_core/tests/system/test_system_device.py index d4e5a2abb0..39eff6176b 100644 --- a/cuda_core/tests/system/test_system_device.py +++ b/cuda_core/tests/system/test_system_device.py @@ -640,8 +640,6 @@ def test_fan(): assert isinstance(min_, int) assert isinstance(max_, int) assert min_ <= max_ - if speed > 0: - assert min_ <= speed <= max_ control_policy = fan_info.control_policy assert isinstance(control_policy, system.FanControlPolicy)