def test_other_three_hands(self): print("\tTESTING high vs two pair vs straight flush...") hands = [ ["10H", "4C", "5S", "KC", "9H"] , ["JH", "4C", "4S", "JC", "9H"], ["7S", "5S", "6S", "8S", "4S"] ] assert two(hands) == ["7S", "5S", "6S", "8S", "4S"]
def test_three_hands(self): print("\tTESTING three hands: three of a kind, one pair, high card...") hands = [ ["7H", "7C", "5S", "JC", "7H"], ["JH", "4C", "7S", "JC", "9H"], ["10H", "4C", "5S", "KC", "9H"] ] assert two(hands) == ["7H", "7C", "5S", "JC", "7H"]
def test_fullhouse_vs_fok_vs_flush(self): print("\tTESTING full house vs four of a kind vs flush...") hands = [ ["7H", "7C", "5S", "5C", "7H"], ["KH", "KC", "KS", "5C", "KH"], ["9C", "7C", "5C", "6C", "10C"] ] assert two(hands) == ["KH", "KC", "KS", "5C", "KH"]
def test_high_vs_high_non_numeric(self): print("\tTESTING high vs high non-numeric...") hands = [ ["JH", "4C", "5S", "KC", "9H"] , ["AH", "4C", "5S", "8C", "9S"] ] assert two(hands) == ["AH", "4C", "5S", "8C", "9S"]
def test_high_vs_high_mixed(self): print("\tTESTING high vs high mix...") hands = [ ["10H", "4C", "5S", "KC", "9H"] , ["AH", "4C", "5S", "8C", "10S"] ] assert two(hands) == ["AH", "4C", "5S", "8C", "10S"]
def test_twopair_vs_onepair(self): print("\tTESTING two pair vs one pair...") hands = [ ["JH", "4C", "5S", "JC", "9H"], ["JH", "4C", "4S", "JC", "9H"] ] assert two(hands) == ["JH", "4C", "4S", "JC", "9H"]
def test_onepair_vs_highest(self): print("\tTESTING one pair vs highest card...") hands = [ ["JH", "4C", "5S", "JC", "9H"], ["JH", "4C", "5S", "KC", "9H"] ] assert two(hands) == ["JH", "4C", "5S", "JC", "9H"]
def test_tof_vs_twopair(self): print("\tTESTING three of a kind vs one pair...") hands = [ ["7H", "7C", "5S", "JC", "7H"], ["JH", "4C", "7S", "JC", "9H"] ] assert two(hands) == ["7H", "7C", "5S", "JC", "7H"]
def test_fof_vs_twopair(self): print("\tTESTING four of a kind vs two pair...") hands = [ ["KH", "KC", "KS", "5C", "KH"], ["JH", "4C", "4S", "JC", "9H"] ] assert two(hands) == ["KH", "KC", "KS", "5C", "KH"]
def test_straigh_vs_straighflush(self): print("\tTESTING straight vs straight flush...") hands = [ ["7H", "5H", "6C", "8C", "4C"] , ["7S", "5S", "6S", "8S", "4S"] ] assert two(hands) == ["7S", "5S", "6S", "8S", "4S"]
def test_royalflush_vs_straightflush(self): print("\tTESTING royal flush vs straight flush...") hands = [ ["AC", "KC", "QC", "JC", "10C"], ["8C", "7C", "6C", "5C", "4C"] ] assert two(hands) == ["AC", "KC", "QC", "JC", "10C"]
def test_royalflsuh_vs_straight(self): print("\tTESTING royal flush vs straight...") hands = [ ["AC", "KC", "QC", "JC", "10C"], ["AH", "KH", "QD", "JC", "10C"] ] assert two(hands) == ["AC", "KC", "QC", "JC", "10C"]