def test_heads_up(): #given high_card_jack = ph.PokerHand("JH 9D 5C 3S 7H") high_card_jack_2 = ph.PokerHand("JD TC 8D 6C 3C") # when result = ph.heads_up(high_card_jack, high_card_jack_2) # then assert result == 2 #given high_card_jack = ph.PokerHand("JH 6D 5C 3S 7H") one_pair = ph.PokerHand("TH TC 7D 6C 3C") # when result = ph.heads_up(one_pair, high_card_jack) # then assert result == 1 #given pair_of_jacks = ph.PokerHand("JH JD 5C 3S 7H") pair_of_jacks_ace_high = ph.PokerHand("JC JS AD 6C 3C") # when result = ph.heads_up(pair_of_jacks, pair_of_jacks_ace_high) # then assert result == 2 # given sixes_over_nines = ph.PokerHand("6H 6C 6D 9H 9S") sevens_over_tens = ph.PokerHand("TH TD 7C 7H 7S") # when result = ph.heads_up(sixes_over_nines, sevens_over_tens) # then assert result == 2
def junk_hand(): return ph.PokerHand("2H 4C 6S 9D JH")
def one_pair(): return ph.PokerHand("QH JS TC TD 7H")
def royal_flush(): return ph.PokerHand("TC JC QC KC AC")
def three_of_a_kind(): return ph.PokerHand("TH TS TD JC 9H")
def two_pair(): return ph.PokerHand("QH QS TC TD 7H")
def flush(): return ph.PokerHand("8H 6H 2H 3H TH")
def straight(): return ph.PokerHand("2H 3C 4S 5D 6H")
def full_house(): return ph.PokerHand("6H 6C 6S 9D 9H")
def four_of_a_kind(): return ph.PokerHand("JH JC JS JD 8H")
def straight_flush(): return ph.PokerHand("8H 6H 7H 9H TH")