def process_args():
'''
Validates the application arguments, and resolves the arguments into a Namespace object.
:rtype: Namespace object with argument values mapped to destination properties. The mapping is defined in the
argument parser.
'''
parser = argparse.ArgumentParser(description="User Sync Test from Adobe")
parser.add_argument("-v", "--version",
action="version",
version="%(prog)s " + APP_VERSION)
parser.add_argument("-c", "--test-suite-config-filename",
help="main test suite config filename.",
metavar="filename",
dest="config_filename",
default=DEFAULT_CONFIG_FILENAME)
parser.add_argument("-g", "--test-group-name",
help="test group to limit testing to.",
metavar="group",
dest="test_group_name",
default=None)
parser.add_argument("-t", "--test",
help="test name",
metavar="name of test",
dest="test_name",
default=None)
parser.add_argument("-l", "--live",
help="sets the user-sync-test tool in Live mode, which directs user-sync to communicate "
"with the ummapi server, and overwrites any recorded session with the communication "
"and output from this new live session. (Playback mode is the default mode.)",
action="store_true",
dest="live_mode")
parser.add_argument("-p", "--playback",
help="sets the user-sync-test tool in Playback mode, which suppresses any communication "
"with the umapi server, and instead plays back the responses recorded from the server "
"during the last live session. (This is the default mode.)",
action="store_false",
dest="live_mode")
parser.set_defaults(live_mode=False)
return parser.parse_args()
评论列表
文章目录