def test_evaluate_hand_straight(): hand = [(7, 'D'), (6, 'S')] board = [(5, 'H'), (4, 'S'), (3, 'D'), (2, 'C'), (13, 'H')] assert(utils.evaluate_hand(hand, board) == (4, 7))
def test_evaluate_hand_two_pair(): hand = [(13, 'D'), (12, 'D')] board = [(13, 'S'), (12, 'S'), (9, 'H'), (8, 'H'), (2, 'S')] assert(utils.evaluate_hand(hand, board) == (2, 13, 12, [9]))
def test_evaluate_hand_trips(): hand = [(13, 'D'), (12, 'D')] board = [(13, 'H'), (13, 'S'), (9, 'H'), (5, 'S'), (2, 'D')] assert(utils.evaluate_hand(hand, board) == (3, 13, [12, 9]))
def test_evaluate_hand_high_card(): hand = [(13, 'D'), (3, 'H')] board = [(10, 'S'), (9, 'H'), (7, 'S'), (12, 'C'), (2, 'C')] assert(utils.evaluate_hand(hand, board) == (0, 13, [12, 10, 9, 7]))
def test_evaluate_hand_pair(): hand = [(13, 'D'), (12, 'S')] board = [(13, 'S'), (2, 'H'), (1, 'H'), (10, 'D'), (6, 'D')] assert(utils.evaluate_hand(hand, board) == (1, 13, [12, 10, 6]))
def test_evaluate_hand_royal_flush(): hand = [(13, 'S'), (12, 'S')] board = [(11, 'S'), (10, 'S'), (9, 'S'), (8, 'S'), (7, 'H')] assert(utils.evaluate_hand(hand, board) == (9, None))
def test_evaluate_hand_straight_flush(): hand = [(10, 'S'), (11, 'S')] board = [(9, 'S'), (8, 'S'), (7, 'S'), (6, 'S'), (5, 'H')] assert(utils.evaluate_hand(hand, board) == (8, 11))
def test_evaluate_hand_quads(): hand = [(7, 'H'), (7, 'S')] board = [(7, 'D'), (7, 'C'), (5, 'D'), (5, 'H'), (5, 'C')] assert(utils.evaluate_hand(hand, board) == (7, [5]))
def test_evaluate_hand_full_house(): hand = [(13, 'S'), (12, 'S')] board = [(13, 'D'), (12, 'H'), (12, 'C'), (6, 'D'), (5, 'C')] assert(utils.evaluate_hand(hand, board) == (6, 12, 13))
def test_evaluate_hand_flush(): hand = [(13, 'S'), (12, 'S')] board = [(4, 'S'), (3, 'S'), (6, 'H'), (2, 'S'), (10, 'D')] assert(utils.evaluate_hand(hand, board) == (5, [13, 12, 4, 3, 2]))