def test_command_get_arg_after_nonexistent_argument(): set_sysargv(test_command_1) c = Command() with pytest.raises(MissingArgumentError): c.get_arg_after('--bogus')
def test_command_get_arg_after_shortopt_multiword(): set_sysargv(test_command_7) c = Command() assert c.get_arg_after('-m') == "initial commit"
def test_command_get_arg_after_lastposition(): set_sysargv(test_command_2) c = Command() with pytest.raises(IndexOutOfRangeError): c.get_arg_after('lastpos')
def test_command_get_arg_after_longopt(): set_sysargv(test_command_3) c = Command() assert c.get_arg_after('--long') == "lastpos"
def test_command_get_arg_after_longopt_alternate(): set_sysargv(test_command_5) c = Command() assert c.get_arg_after('--test-option') == "lastpos"
def test_command_get_arg_after_shortopt(): set_sysargv(test_command_2) c = Command() assert c.get_arg_after('-s') == "lastpos"
def test_command_get_arg_after_with_empty_arglist(): set_sysargv(test_command_empty_1) c = Command() with pytest.raises(MissingArgumentError): c.get_arg_after('--test')
def test_command_get_arg_after_subcmd(): set_sysargv(test_command_10) c = Command() assert c.get_arg_after('subcmd') == "subsubcmd"
def test_command_get_arg_after_subcmd_alternate(): set_sysargv(test_command_6) c = Command() assert c.get_arg_after('install') == "git-all"