def test_command_contains_codeseq_noargs(): set_sysargv(test_command_empty_1) c = Command() assert c.has_command_sequence("name", "bogus") == False
def test_command_contains_codeseq_with_dashes_fail(): set_sysargv(test_command_6) c = Command() assert c.has_command_sequence("install", "bogus") == False
def test_command_contains_codeseq_with_dashes(): set_sysargv(test_command_6) c = Command() assert c.has_command_sequence("install", "git-all") == True
def test_command_contains_codeseq_with_options_fail(): set_sysargv(test_command_1) c = Command() assert c.has_command_sequence("subcmd", "-s", "bogus") == False
def test_command_contains_codeseq_with_options(): set_sysargv(test_command_1) c = Command() assert c.has_command_sequence("subcmd", "-s", "--long") == True
def test_command_contains_codeseq(): set_sysargv(test_command_10) c = Command() assert c.has_command_sequence("subcmd", "subsubcmd") == True