Index: suite_leahi/shared/scripts/configuration/application_init.py =================================================================== diff -u -r3d68c1dc9aa0aa6efcdf2943989ed888ffc854f6 -r9f922977ecbe83f170f8d6be296539d8242a2fc8 --- suite_leahi/shared/scripts/configuration/application_init.py (.../application_init.py) (revision 3d68c1dc9aa0aa6efcdf2943989ed888ffc854f6) +++ suite_leahi/shared/scripts/configuration/application_init.py (.../application_init.py) (revision 9f922977ecbe83f170f8d6be296539d8242a2fc8) @@ -189,25 +189,27 @@ return aut_version_only def reset_system_setting(setting_key): + """ + Resets a specific setting in System.conf to its default value from System.dflt. """ - Resets a specific setting in System.conf to its default value from System.dflt. - """ base_path = Path.home() / "Public/luis/config/configurations/Settings/" source_file = base_path / "System.dflt" target_file = base_path / "System.conf" - new_value = None search_pattern = f"{setting_key} =" # Read the default value from .dflt with open(source_file, 'r') as f: for line in f: if search_pattern in line: - new_value = line.split("=")[1].strip() - break - + parts = line.split("=") + if len(parts) >= 2: + new_value = parts[1].strip() + # If split fails (len < 2), new_value remains None and loop continues/breaks + break + if new_value is None: - print(f"Setting '{setting_key}' not found in {source_file.name}") + test.log(f"Setting '{setting_key}' not found in {source_file.name}") return # Read the current .conf file Index: suite_leahi/suite.conf =================================================================== diff -u -rf031229ccabc0208a2ac1a0e7c85122c6a17d42e -r9f922977ecbe83f170f8d6be296539d8242a2fc8 --- suite_leahi/suite.conf (.../suite.conf) (revision f031229ccabc0208a2ac1a0e7c85122c6a17d42e) +++ suite_leahi/suite.conf (.../suite.conf) (revision 9f922977ecbe83f170f8d6be296539d8242a2fc8) @@ -1,6 +1,6 @@ AUT=leahi LANGUAGE=Python OBJECTMAPSTYLE=script -TEST_CASES=tst_blood_set_auto +TEST_CASES=tst_solution_infusion tst_main_treatment tst_service_export_logs tst_device_settings_information_version tst_headerbar_information_popup tst_headerbar_wifi_indicator tst_device_settings_wifi tst_ultrafiltration tst_create_treatment tst_general_alarm_requirements_instruction tst_headerbar_prescription tst_heparin tst_blood_set_auto VERSION=3 WRAPPERS=Qt Index: suite_leahi/tst_blood_set_auto/test.py =================================================================== diff -u -r625ff1b3c488dd364588e4ea6143dc8e63c2bb74 -r9f922977ecbe83f170f8d6be296539d8242a2fc8 --- suite_leahi/tst_blood_set_auto/test.py (.../test.py) (revision 625ff1b3c488dd364588e4ea6143dc8e63c2bb74) +++ suite_leahi/tst_blood_set_auto/test.py (.../test.py) (revision 9f922977ecbe83f170f8d6be296539d8242a2fc8) @@ -49,24 +49,24 @@ def main(): utils.tstStart(__file__) - test.startSection("Blood Set Auto Load and Eject") - - # handle bloodSetAutoLoad sent messages from UI - if can_interface is not None: - channel_id = CAN.DenaliChannels.ui_to_td_ch_id - message_id = MsgIds.MSG_ID_UI_ADJUST_DISPOSABLES_CONFIRM_REQUEST.value - can_interface.register_receiving_publication_function( - channel_id, message_id, handle_blood_set_auto_load_request - ) + if can_interface is None: + test.log("CAN Interface is not available. Stopping tests.") + return - # handle bloodSetAutoEject sent messages from UI - if can_interface is not None: - channel_id = CAN.DenaliChannels.ui_to_td_ch_id - message_id = MsgIds.MSG_ID_UI_ADJUST_DISPOSABLES_REMOVAL_CONFIRM_REQUEST.value - can_interface.register_receiving_publication_function( - channel_id, message_id, handle_blood_set_auto_eject_request - ) - + channel_id = CAN.DenaliChannels.ui_to_td_ch_id + + # Register Blood Set Auto Load Request + message_id = MsgIds.MSG_ID_UI_ADJUST_DISPOSABLES_CONFIRM_REQUEST.value + can_interface.register_receiving_publication_function( + channel_id, message_id, handle_blood_set_auto_load_request + ) + # Register Blood Set Auto Eject Request + message_id = MsgIds.MSG_ID_UI_ADJUST_DISPOSABLES_REMOVAL_CONFIRM_REQUEST.value + can_interface.register_receiving_publication_function( + channel_id, message_id, handle_blood_set_auto_eject_request + ) + + test.startSection("Blood Set Auto Load and Eject") application_init.reset_system_setting("AdvancedMode") startApplication(utility.aut("-q")) td_simulator.td_operation_mode(TDOpModes.MODE_STAN.value)