@@ -276,7 +276,9 @@ def test_device_pci_bus_id():
276276@pytest .mark .skipif (helpers .IS_WSL or helpers .IS_WINDOWS , reason = "Device attributes not supported on WSL or Windows" )
277277def test_device_attributes ():
278278 for device in system .Device .get_all_devices ():
279- with unsupported_before (device , DeviceArch .AMPERE ):
279+ # Docs say this should work on AMPERE or newer, but experimentally
280+ # that's not the case.
281+ with unsupported_before (device , None ):
280282 attributes = device .attributes
281283 assert isinstance (attributes , system .DeviceAttributes )
282284
@@ -538,12 +540,18 @@ def test_clock():
538540 assert isinstance (current_mhz , int )
539541 assert current_mhz >= 0
540542
543+ # Docs say this should work on PASCAL or newer, but experimentally,
544+ # is also unsupported on other hardware.
541545 with unsupported_before (device , DeviceArch .MAXWELL ):
542- offsets = clock .get_offsets (pstate )
543- assert isinstance (offsets , system .ClockOffsets )
544- assert isinstance (offsets .clock_offset_mhz , int )
545- assert isinstance (offsets .max_offset_mhz , int )
546- assert isinstance (offsets .min_offset_mhz , int )
546+ try :
547+ offsets = clock .get_offsets (pstate )
548+ except system .InvalidArgumentError :
549+ pass
550+ else :
551+ assert isinstance (offsets , system .ClockOffsets )
552+ assert isinstance (offsets .clock_offset_mhz , int )
553+ assert isinstance (offsets .max_offset_mhz , int )
554+ assert isinstance (offsets .min_offset_mhz , int )
547555
548556 # By docs, should be supported on PASCAL or newer, but experimentally,
549557 # is also unsupported on other hardware.
0 commit comments