Beispiel #1
0
 def test_get_hand_rank_high_card(self):
     short_names = ['2d', '8d', 'ac', '3s', 'qd']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(poker_hand.HIGH_CARD, poker_hand.get_hand_rank(hand))
Beispiel #2
0
 def test_get_hand_rank_three_of_a_kind(self):
     short_names = ['2d', '3d', '2c', '2s', 'ad']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(poker_hand.THREE_OF_A_KIND,
                      poker_hand.get_hand_rank(hand))
Beispiel #3
0
 def test_get_hand_rank_one_pair(self):
     short_names = ['2d', '8d', '2c', '3s', 'ad']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(poker_hand.ONE_PAIR, poker_hand.get_hand_rank(hand))
Beispiel #4
0
 def test_get_hand_rank_flush(self):
     short_names = ['2d', '3d', '8d', 'ad', 'qd']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(poker_hand.FLUSH, poker_hand.get_hand_rank(hand))
Beispiel #5
0
 def test_get_hand_rank_straight(self):
     short_names = ['2d', '3d', '4c', '5s', 'ad']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(poker_hand.STRAIGHT, poker_hand.get_hand_rank(hand))
Beispiel #6
0
 def test_get_hand_rank_four_of_a_kind(self):
     short_names = ['2h', '2s', '2d', '2c', '6h']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(poker_hand.FOUR_OF_A_KIND,
                      poker_hand.get_hand_rank(hand))
Beispiel #7
0
 def test_get_hand_rank_full_house(self):
     short_names = ['2h', '2s', '2d', '6c', '6h']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(poker_hand.FULL_HOUSE, poker_hand.get_hand_rank(hand))
 def test_get_hand_rank_high_card(self):
     short_names = ['2d', '8d', 'ac', '3s', 'qd']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(
         poker_hand.HIGH_CARD, poker_hand.get_hand_rank(hand))
Beispiel #9
0
 def test_get_hand_rank_straight_flush(self):
     short_names = ['2h', '3h', '4h', '5h', '6h']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(poker_hand.STRAIGHT_FLUSH,
                      poker_hand.get_hand_rank(hand))
 def test_get_hand_rank_three_of_a_kind(self):
     short_names = ['2d', '3d', '2c', '2s', 'ad']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(
         poker_hand.THREE_OF_A_KIND, poker_hand.get_hand_rank(hand))
 def test_get_hand_rank_one_pair(self):
     short_names = ['2d', '8d', '2c', '3s', 'ad']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(
         poker_hand.ONE_PAIR, poker_hand.get_hand_rank(hand))
 def test_get_hand_rank_straight(self):
     short_names = ['2d', '3d', '4c', '5s', 'ad']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(
         poker_hand.STRAIGHT, poker_hand.get_hand_rank(hand))
 def test_get_hand_rank_flush(self):
     short_names = ['2d', '3d', '8d', 'ad', 'qd']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(
         poker_hand.FLUSH, poker_hand.get_hand_rank(hand))
 def test_get_hand_rank_full_house(self):
     short_names = ['2h', '2s', '2d', '6c', '6h']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(
         poker_hand.FULL_HOUSE, poker_hand.get_hand_rank(hand))
 def test_get_hand_rank_four_of_a_kind(self):
     short_names = ['2h', '2s', '2d', '2c', '6h']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(
         poker_hand.FOUR_OF_A_KIND, poker_hand.get_hand_rank(hand))
 def test_get_hand_rank_straight_flush(self):
     short_names = ['2h', '3h', '4h', '5h', '6h']
     hand = self._create_poker_hand_from_short_name_list(short_names)
     self.assertEqual(
         poker_hand.STRAIGHT_FLUSH, poker_hand.get_hand_rank(hand))