예제 #1
0
def test_command_get_doubledash_2():
    set_sysargv(test_command_12)
    c = Command()
    assert len(c.get_double_dash_args()) == 4
    assert c.get_double_dash_args() == [
        'lastpos', '--test', 'path2', 'another'
    ]
예제 #2
0
def test_command_get_doubledash_not_present_2():
    set_sysargv(test_command_empty_1)
    c = Command()
    with pytest.raises(MissingArgumentError):
        c.get_double_dash_args()
예제 #3
0
def test_command_get_doubledash_1():
    set_sysargv(test_command_11)
    c = Command()
    assert len(c.get_double_dash_args()) == 4
    assert c.get_double_dash_args() == ['lastpos', '-n', '--long', 'another']
def test_command_get_doubledash_not_present_2():
    set_sysargv(test_command_empty_1)
    c = Command()
    with pytest.raises(MissingArgumentError):
        c.get_double_dash_args()
def test_command_get_doubledash_3():
    set_sysargv(test_command_13)
    c = Command()
    assert len(c.get_double_dash_args()) == 4
    assert c.get_double_dash_args() == ['lastpos', '-t', 'path2', 'another']
def test_command_get_doubledash_1():
    set_sysargv(test_command_11)
    c = Command()
    assert len(c.get_double_dash_args()) == 4
    assert c.get_double_dash_args() == ['lastpos', '-n', '--long', 'another']