@@ -410,12 +410,12 @@ def test_needs_gpu_reboot_true(check_output, is_state, remove_state, set_state):
410410
411411
412412@pytest .mark .parametrize (
413- "restart,initial_env,expected_during,expected_after,log_called " ,
413+ "restart,initial_env,expected_during,expected_after" ,
414414 [
415- (True , {}, None , None , False ),
416- (False , {}, "1" , "1" , True ),
417- (True , {"NEEDRESTART_SUSPEND" : "original_value " }, None , "original_value" , False ),
418- (False , {"NEEDRESTART_SUSPEND" : "original_value " }, "1" , "original_value" , True ),
415+ (True , {}, None , None ),
416+ (False , {}, "1" , None ),
417+ (True , {"NEEDRESTART_SUSPEND" : "original " }, None , "original" ),
418+ (False , {"NEEDRESTART_SUSPEND" : "original " }, "1" , "original" ),
419419 ],
420420 ids = [
421421 "restart=True, no initial env" ,
@@ -426,9 +426,10 @@ def test_needs_gpu_reboot_true(check_output, is_state, remove_state, set_state):
426426)
427427@mock .patch .object (containerd , "log" )
428428@mock .patch .dict (os .environ , {}, clear = True )
429- def test_apt_restart_services (mock_log , restart , initial_env , expected_during , expected_after , log_called ):
429+ def test_apt_restart_services (mock_log , restart , initial_env , expected_during , expected_after ):
430430 """Verify _apt_restart_services behavior with various configurations."""
431431 # Setup initial environment from parameters
432+ log_called = not restart
432433 os .environ .update (initial_env )
433434
434435 with containerd ._apt_restart_services (restart = restart ):
0 commit comments