mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-15 17:11:20 +01:00
made markers argument in ParseArguments a boolean instead of an int
This commit is contained in:
@@ -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).')
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user