app.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:user-sync.py 作者: adobe-apiplatform 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号