def test_command_has_args_after_noargs():
    set_sysargv(test_command_empty_1)
    c = Command()
    with pytest.raises(MissingArgumentError):
        c.has_args_after("subcmd")
def test_command_has_args_after_number_2_fail():
    set_sysargv(test_command_10)
    c = Command()
    assert c.has_args_after("subcmd", number=2) == False
def test_command_has_args_after_number_2():
    set_sysargv(test_command_1)
    c = Command()
    assert c.has_args_after("--name", number=2) == True
def test_command_has_args_after_default_number_1_parameter_noexist():
    set_sysargv(test_command_empty_1)
    c = Command()
    with pytest.raises(MissingArgumentError):
        c.has_args_after("bogus")
def test_command_has_args_after_default_number_1_fail():
    set_sysargv(test_command_1)
    c = Command()
    assert c.has_args_after("lastpos") == False
def test_command_has_args_after_default_number_1():
    set_sysargv(test_command_1)
    c = Command()
    assert c.has_args_after("--name") == True