@@ -529,47 +529,45 @@ def test_clock():
529529 clock = device .clock (clock_type )
530530 assert isinstance (clock , system .ClockInfo )
531531
532- for clock_type in system .ClockType :
533- try :
534- current_mhz = clock .get_current_mhz ()
535- except system .NotSupportedError :
536- continue
537- assert isinstance (current_mhz , int )
538- assert current_mhz >= 0
539-
540- current_mhz = clock .get_current_mhz (system .ClockId .CURRENT )
541- assert isinstance (current_mhz , int )
542- assert current_mhz >= 0
543-
544- max_mhz = clock .get_max_mhz ()
545- assert isinstance (max_mhz , int )
546- assert max_mhz >= 0
547-
548- try :
549- max_customer_boost = clock .get_max_customer_boost_mhz ()
550- except system .NotSupportedError :
551- pass
552- else :
553- assert isinstance (max_customer_boost , int )
554- assert max_customer_boost >= 0
555-
556- pstate = device .performance_state
557-
558- min_ , max_ = clock .get_min_max_clock_of_pstate_mhz (pstate )
559- assert isinstance (min_ , int )
560- assert min_ >= 0
561- assert isinstance (max_ , int )
562- assert max_ >= 0
532+ try :
533+ current_mhz = clock .get_current_mhz ()
534+ except system .NotSupportedError :
535+ continue
536+ assert isinstance (current_mhz , int )
537+ assert current_mhz >= 0
538+
539+ current_mhz = clock .get_current_mhz (system .ClockId .CURRENT )
540+ assert isinstance (current_mhz , int )
541+ assert current_mhz >= 0
542+
543+ max_mhz = clock .get_max_mhz ()
544+ assert isinstance (max_mhz , int )
545+ assert max_mhz >= 0
563546
564- try :
565- offsets = clock .get_offsets (pstate )
566- except system .InvalidArgumentError :
567- offsets = system .ClockOffsets (nvml .ClockOffset_v1 ())
568- else :
569- assert isinstance (offsets , system .ClockOffsets )
570- assert isinstance (offsets .clock_offset_mhz , int )
571- assert isinstance (offsets .max_offset_mhz , int )
572- assert isinstance (offsets .min_offset_mhz , int )
547+ try :
548+ max_customer_boost = clock .get_max_customer_boost_mhz ()
549+ except system .NotSupportedError :
550+ pass
551+ else :
552+ assert isinstance (max_customer_boost , int )
553+ assert max_customer_boost >= 0
554+
555+ pstate = device .performance_state
556+
557+ min_ , max_ = clock .get_min_max_clock_of_pstate_mhz (pstate )
558+ assert isinstance (min_ , int )
559+ assert min_ >= 0
560+ assert isinstance (max_ , int )
561+ assert max_ >= 0
562+
563+ try :
564+ offsets = clock .get_offsets (pstate )
565+ except system .InvalidArgumentError :
566+ offsets = system .ClockOffsets (nvml .ClockOffset_v1 ())
567+ assert isinstance (offsets , system .ClockOffsets )
568+ assert isinstance (offsets .clock_offset_mhz , int )
569+ assert isinstance (offsets .max_offset_mhz , int )
570+ assert isinstance (offsets .min_offset_mhz , int )
573571
574572
575573def test_clock_event_reasons ():
@@ -624,7 +622,7 @@ def test_cooler():
624622 assert isinstance (cooler_info , system .CoolerInfo )
625623
626624 signal_type = cooler_info .signal_type
627- assert isinstance (signal_type , system .CoolerSignalType )
625+ assert isinstance (signal_type , system .CoolerControl )
628626
629627 target = cooler_info .target
630628 assert all (isinstance (t , system .CoolerTarget ) for t in target )
0 commit comments