def test_findbesthand_flush_returnsFLUSH(self): cards = tools.convert_to_cards(['8s', '9s', 'Tc', 'Js', 'Qs', 'Ks', 'Ac']) besthand = evaluator.find_best_hand(cards) val = evaluator.get_value(besthand) expected = 'FLUSH' result = evaluator.get_type(val) self.assertEqual(expected, result)
def test_findbesthand_straight_returnsSTRAIGHT(self): cards = tools.convert_to_cards(['Ac', 'As', '2c', '3s', '4h', '5s', '5h']) besthand = evaluator.find_best_hand(cards) val = evaluator.get_value(besthand) expected = 'STRAIGHT' result = evaluator.get_type(val) self.assertEqual(expected, result)
def test_findbesthand_quads_returnsQUADS(self): cards = tools.convert_to_cards(['Kc', 'Kd', 'Ks', 'Ac', 'Kd', 'Ah', 'As']) besthand = evaluator.find_best_hand(cards) val = evaluator.get_value(besthand) expected = 'QUADS' result = evaluator.get_type(val) self.assertEqual(expected, result)
def test_findbesthand_straightflush_returnsSTRAIGHTFLUSH(self): cards = tools.convert_to_cards(['4s', '5s', '6s', '7s', '8s', 'Ks', 'As']) besthand = evaluator.find_best_hand(cards) val = evaluator.get_value(besthand) expected = 'STRAIGHT FLUSH' result = evaluator.get_type(val) self.assertEqual(expected, result)
def test_findbesthand_fullhouse_returnsFULLHOUSE(self): cards = tools.convert_to_cards(['7c', '7s', 'Ks', 'Kc', 'Ah', 'Ac', 'As']) besthand = evaluator.find_best_hand(cards) val = evaluator.get_value(besthand) expected = 'FULL HOUSE' result = evaluator.get_type(val) self.assertEqual(expected, result)
def test_findbesthand_pair_returnsPAIR(self): cards = tools.convert_to_cards(['2c', '3c', '5s', '7s', 'Kc', 'Ac', 'As']) besthand = evaluator.find_best_hand(cards) val = evaluator.get_value(besthand) expected = 'PAIR' result = evaluator.get_type(val) self.assertEqual(expected, result)