Exemplo n.º 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'
    ]
Exemplo n.º 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()
Exemplo n.º 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']