Exemple #1
0
def merge_options_message_test8():
    """ hideとdefaultとconfにOptionがある場合のmessageのテスト """
    input_opts = get_input_opts()
    input_opts['message'] = 'DefaultMessage'
    assert (cl.merge_options(
        input_opts, {'message': 'ConfMessage'},
        {'message': 'HideMessage'})['message'] == 'DefaultMessage')
Exemple #2
0
def merge_options_message_test6():
    """ hideとconfにOptionがある場合のmessageのテスト """
    assert (cl.merge_options(
        get_input_opts(), {'message': 'ConfMessage'},
        {'message': 'HideMessage'})['message'] == 'ConfMessage')
Exemple #3
0
def merge_options_message_test5():
    """ hideだけOptionがある場合のmessageのテスト """
    assert (cl.merge_options(
        get_input_opts(), {},
        {'message': 'HideMessage'})['message'] == 'HideMessage')
Exemple #4
0
def merge_options_message_test4():
    """ inputもconfもOptionがある場合のmessageのテスト """
    input_opts = get_input_opts()
    input_opts['message'] = 'DefaultMessage'
    assert (cl.merge_options(input_opts, {'message': 'ConfMessage'},
                             {})['message'] == 'DefaultMessage')
Exemple #5
0
def merge_options_message_test3():
    """ inputだけOptionがある場合のmessageのテスト """
    input_opts = get_input_opts()
    input_opts['message'] = 'DefaultMessage'
    assert cl.merge_options(input_opts, {}, {})['message'] == 'DefaultMessage'
Exemple #6
0
def merge_options_message_test2():
    """ ConfだけOptionがある場合のmessageのテスト """
    assert cl.merge_options(get_input_opts(), {'message': 'ConfMessage'},
                            {})['message'] == 'ConfMessage'
Exemple #7
0
def merge_options_message_test1():
    """ なにもOptionがない場合のmessageのテスト """
    print((cl.merge_options(get_input_opts(), {}, {})['message']))
    assert cl.merge_options(get_input_opts(), {}, {})['message'] == \
        cl.DEFAULT_MESSAGE.replace('<sleep_time_sec>', '0')