From 595bf38605af105c64da1f0c2f9e4774d922d5a5 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 5 Aug 2025 11:49:53 +0200 Subject: [PATCH] made markers argument in ParseArguments a boolean instead of an int --- tests/scripts/test_simulators.py | 2 +- tests/scripts/utils_for_test.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/scripts/test_simulators.py b/tests/scripts/test_simulators.py index 4dfd768a7..9b535c29d 100644 --- a/tests/scripts/test_simulators.py +++ b/tests/scripts/test_simulators.py @@ -73,7 +73,7 @@ def startCmdTestsForAll(args, fp): if __name__ == '__main__': - args = ParseArguments(description='Automated tests with the virtual detector servers', default_num_mods=1, markers=1, general_tests_option=True) + args = ParseArguments(description='Automated tests with the virtual detector servers', default_num_mods=1, markers=True, general_tests_option=True) if args.num_mods > 1: raise RuntimeException(f'Cannot support multiple modules at the moment (except Eiger).') diff --git a/tests/scripts/utils_for_test.py b/tests/scripts/utils_for_test.py index 36308e60f..7feb4e70e 100644 --- a/tests/scripts/utils_for_test.py +++ b/tests/scripts/utils_for_test.py @@ -255,7 +255,7 @@ def loadBasicSettings(name, d, fp): except Exception as e: raise RuntimeException(f'Could not load config for {name}. Error: {str(e)}') from e -def ParseArguments(description, default_num_mods=1, markers=0, general_tests_option=False): +def ParseArguments(description, default_num_mods=1, markers=False, general_tests_option=False): parser = argparse.ArgumentParser(description) parser.add_argument('rx_hostname', nargs='?', default='localhost', @@ -268,7 +268,7 @@ def ParseArguments(description, default_num_mods=1, markers=0, general_tests_opt help='Number of frames to test with') parser.add_argument('-s', '--servers', nargs='*', help='Detector servers to run') - if markers == 1: + if markers: parser.add_argument('-m', '--markers', nargs='?', default ='[.cmdcall]', help = 'Markers to use for cmd tests, default: [.cmdcall]') @@ -298,7 +298,7 @@ def ParseArguments(description, default_num_mods=1, markers=0, general_tests_opt f"num_mods: '{args.num_mods}'\n" f"num_frames: '{args.num_frames}'" ) - if markers == 1: + if markers: msg += f"\nmarkers: '{args.markers}'" if general_tests_option: