@@ -198,25 +198,25 @@ def test_device_pci_info():
198198 assert isinstance (pci_info .sub_class , int )
199199 assert 0x00 <= pci_info .sub_class <= 0xFF
200200
201- assert isinstance (pci_info .get_max_pcie_link_generation () , int )
202- assert 0 <= pci_info .get_max_pcie_link_generation () <= 0xFF
201+ assert isinstance (pci_info .link_generation , int )
202+ assert 0 <= pci_info .link_generation <= 0xFF
203203
204- assert isinstance (pci_info .get_gpu_max_pcie_link_generation () , int )
205- assert 0 <= pci_info .get_gpu_max_pcie_link_generation () <= 0xFF
204+ assert isinstance (pci_info .max_link_generation , int )
205+ assert 0 <= pci_info .max_link_generation <= 0xFF
206206
207- assert isinstance (pci_info .get_max_pcie_link_width () , int )
208- assert 0 <= pci_info .get_max_pcie_link_width () <= 0xFF
207+ assert isinstance (pci_info .max_link_width , int )
208+ assert 0 <= pci_info .max_link_width <= 0xFF
209209
210- assert isinstance (pci_info .get_current_pcie_link_generation () , int )
211- assert 0 <= pci_info .get_current_pcie_link_generation () <= 0xFF
210+ assert isinstance (pci_info .current_link_generation , int )
211+ assert 0 <= pci_info .current_link_generation <= 0xFF
212212
213- assert isinstance (pci_info .get_current_pcie_link_width () , int )
214- assert 0 <= pci_info .get_current_pcie_link_width () <= 0xFF
213+ assert isinstance (pci_info .current_link_width , int )
214+ assert 0 <= pci_info .current_link_width <= 0xFF
215215
216216 with unsupported_before (device , None ):
217- assert isinstance (pci_info .get_pcie_throughput (system .PcieUtilCounter .PCIE_UTIL_TX_BYTES ), int )
217+ assert isinstance (pci_info .get_throughput (system .PcieUtilCounter .PCIE_UTIL_TX_BYTES ), int )
218218
219- assert isinstance (pci_info .get_pcie_replay_counter () , int )
219+ assert isinstance (pci_info .replay_counter , int )
220220
221221
222222def test_device_serial ():
@@ -336,23 +336,23 @@ def test_device_attributes():
336336def test_c2c_mode_enabled ():
337337 for device in system .Device .get_all_devices ():
338338 with unsupported_before (device , None ):
339- is_enabled = device .is_c2c_mode_enabled
339+ is_enabled = device .is_c2c_enabled
340340 assert isinstance (is_enabled , bool )
341341
342342
343343@pytest .mark .skipif (helpers .IS_WSL or helpers .IS_WINDOWS , reason = "Persistence mode not supported on WSL or Windows" )
344344def test_persistence_mode_enabled ():
345345 for device in system .Device .get_all_devices ():
346- is_enabled = device .persistence_mode_enabled
346+ is_enabled = device .persistence_mode
347347 assert isinstance (is_enabled , bool )
348348 try :
349- device .persistence_mode_enabled = False
349+ device .persistence_mode = False
350350 except nvml .NoPermissionError as e :
351351 pytest .xfail (f"nvml.NoPermissionError: { e } " )
352352 try :
353- assert device .persistence_mode_enabled is False
353+ assert device .persistence_mode is False
354354 finally :
355- device .persistence_mode_enabled = is_enabled
355+ device .persistence_mode = is_enabled
356356
357357
358358def test_field_values ():
@@ -440,11 +440,11 @@ def test_addressing_mode():
440440
441441def test_display_mode ():
442442 for device in system .Device .get_all_devices ():
443- display_mode = device .display_mode
444- assert isinstance (display_mode , bool )
443+ is_display_connected = device .is_display_connected
444+ assert isinstance (is_display_connected , bool )
445445
446- display_active = device .display_active
447- assert isinstance (display_active , bool )
446+ is_display_active = device .is_display_active
447+ assert isinstance (is_display_active , bool )
448448
449449
450450def test_repair_status ():
@@ -548,15 +548,15 @@ def test_auto_boosted_clocks_enabled():
548548 # This API is supported on KEPLER and newer, but it also seems
549549 # unsupported elsewhere.
550550 with unsupported_before (device , None ):
551- current , default = device .get_auto_boosted_clocks_enabled ()
551+ current , default = device .is_auto_boosted_clocks_enabled
552552 assert isinstance (current , bool )
553553 assert isinstance (default , bool )
554554
555555
556556def test_clock ():
557557 for device in system .Device .get_all_devices ():
558558 for clock_type in system .ClockType :
559- clock = device .clock (clock_type )
559+ clock = device .get_clock (clock_type )
560560 assert isinstance (clock , system .ClockInfo )
561561
562562 # These are ordered from oldest API to newest API so we test as much
@@ -605,11 +605,11 @@ def test_clock():
605605def test_clock_event_reasons ():
606606 for device in system .Device .get_all_devices ():
607607 with unsupported_before (device , None ):
608- reasons = device .get_current_clock_event_reasons ()
608+ reasons = device .current_clock_event_reasons
609609 assert all (isinstance (reason , system .ClocksEventReasons ) for reason in reasons )
610610
611611 with unsupported_before (device , None ):
612- reasons = device .get_supported_clock_event_reasons ()
612+ reasons = device .supported_clock_event_reasons
613613 assert all (isinstance (reason , system .ClocksEventReasons ) for reason in reasons )
614614
615615
@@ -621,7 +621,7 @@ def test_fan():
621621 pytest .skip ("Device has no fans to test" )
622622
623623 for fan_idx in range (device .num_fans ):
624- fan_info = device .fan (fan_idx )
624+ fan_info = device .get_fan (fan_idx )
625625 assert isinstance (fan_info , system .FanInfo )
626626
627627 speed = fan_info .speed
@@ -650,7 +650,7 @@ def test_fan():
650650 control_policy = fan_info .control_policy
651651 assert isinstance (control_policy , system .FanControlPolicy )
652652 finally :
653- fan_info .set_default_fan_speed ()
653+ fan_info .set_default_speed ()
654654
655655
656656def test_cooler ():
@@ -677,15 +677,15 @@ def test_temperature():
677677 temperature = device .temperature
678678 assert isinstance (temperature , system .Temperature )
679679
680- sensor = temperature .sensor ()
680+ sensor = temperature .get_sensor ()
681681 assert isinstance (sensor , int )
682682 assert sensor >= 0
683683
684684 # By docs, should be supported on KEPLER or newer, but experimentally,
685685 # is also unsupported on other hardware.
686686 with unsupported_before (device , None ):
687687 for threshold in list (system .TemperatureThresholds )[:- 1 ]:
688- t = temperature .threshold (threshold )
688+ t = temperature .get_threshold (threshold )
689689 assert isinstance (t , int )
690690 assert t >= 0
691691
@@ -695,7 +695,7 @@ def test_temperature():
695695 assert margin >= 0
696696
697697 with unsupported_before (device , None ):
698- thermals = temperature .thermal_settings (system .ThermalTarget .ALL )
698+ thermals = temperature .get_thermal_settings (system .ThermalTarget .ALL )
699699 assert isinstance (thermals , system .ThermalSettings )
700700
701701 for i , sensor in enumerate (thermals ):
@@ -716,7 +716,7 @@ def test_pstates():
716716 pstate = device .performance_state
717717 assert isinstance (pstate , system .Pstates )
718718
719- pstates = device .get_supported_pstates ()
719+ pstates = device .supported_pstates
720720 assert all (isinstance (p , system .Pstates ) for p in pstates )
721721
722722 dynamic_pstates_info = device .dynamic_pstates_info
0 commit comments