Ejemplo n.º 1
0
 def test_HandType_four_of_a_kind(self):
     x = PokerHand(['SA', 'SA', 'DA', 'CA', 'ST'])
     self.assertEqual(str(x.get_hand_type()), "HandType.FourK")
Ejemplo n.º 2
0
 def test_Handscore_four_of_a_kind(self):
     self.assertEqual(str(PokerHand(['SA', 'SA', 'DA', 'CA', 'ST']).score),
                      "81414141410")
Ejemplo n.º 3
0
 def test_Handscore_full_house_3T2A(self):
     self.assertEqual(str(PokerHand(['SA', 'SA', 'CT', 'DT', 'ST']).score),
                      "71414101010")
Ejemplo n.º 4
0
 def test_Hand_short_score_straight_low(self):
     self.assertEqual(
         str(PokerHand(['SA', 'D2', 'H3', 'C4', 'S5']).short_score),
         "51405")
Ejemplo n.º 5
0
 def test_Handscore_six_card_straight_flush(self):
     self.assertEqual(
         str(PokerHand(['SA', 'SK', 'SQ', 'SJ', 'ST', 'S9']).score),
         "11141312111009")
Ejemplo n.º 6
0
 def test_Hand_short_score_two_pair(self):
     self.assertEqual(
         str(PokerHand(['SA', 'DA', 'SQ', 'DQ', 'CT']).short_score),
         "31412")
Ejemplo n.º 7
0
 def test_Hand_short_score_high_card(self):
     self.assertEqual(
         str(PokerHand(['SA', 'C3', 'SQ', 'SJ', 'ST']).short_score),
         "11412")
Ejemplo n.º 8
0
 def test_HandType_pair(self):
     x = PokerHand(['SA', 'SK', 'SQ', 'DQ', 'ST'])
     self.assertEqual(str(x.get_hand_type()), "HandType.OneP")
Ejemplo n.º 9
0
 def test_HandType_high_card(self):
     x = PokerHand(['SA', 'C3', 'SQ', 'SJ', 'ST'])
     self.assertEqual(str(x.get_hand_type()), "HandType.HighC")
Ejemplo n.º 10
0
 def test_HandType_trip(self):
     x = PokerHand(['SA', 'DA', 'HA', 'SJ', 'ST'])
     self.assertEqual(str(x.get_hand_type()), "HandType.Trip")
Ejemplo n.º 11
0
 def test_HandType_two_pair(self):
     x = PokerHand(['SA', 'DA', 'SQ', 'DQ', 'CT'])
     self.assertEqual(str(x.get_hand_type()), "HandType.TwoP")
Ejemplo n.º 12
0
 def test_HandType_straight(self):
     x = PokerHand(['SA', 'SK', 'SQ', 'SJ', 'DT'])
     self.assertEqual(str(x.get_hand_type()), "HandType.Straight")
Ejemplo n.º 13
0
 def test_HandType_flush(self):
     x = PokerHand(['SA', 'SK', 'SQ', 'SJ', 'S4'])
     self.assertEqual(str(x.get_hand_type()), "HandType.Flush")
Ejemplo n.º 14
0
 def test_HandType_full_house(self):
     x = PokerHand(['SA', 'SA', 'HA', 'DT', 'ST'])
     self.assertEqual(str(x.get_hand_type()), "HandType.FullH")
Ejemplo n.º 15
0
 def test_Hand_short_score_trip(self):
     self.assertEqual(
         str(PokerHand(['SA', 'DA', 'HA', 'SJ', 'ST']).short_score),
         "41461")
Ejemplo n.º 16
0
 def test_HandType_straight_flush_low(self):
     x = PokerHand(['SA', 'S2', 'S3', 'S4', 'S5'])
     self.assertEqual(str(x.get_hand_type()), "HandType.FiveSF")
Ejemplo n.º 17
0
 def test_Hand_short_score_trip2(self):
     self.assertEqual(
         str(PokerHand(['ST', 'DA', 'HT', 'SJ', 'ST']).short_score),
         "41064")
Ejemplo n.º 18
0
 def test_HandType_straight_low(self):
     x = PokerHand(['SA', 'D2', 'H3', 'C4', 'S5'])
     self.assertEqual(str(x.get_hand_type()), "HandType.Straight")
Ejemplo n.º 19
0
 def test_Hand_short_score_pair(self):
     self.assertEqual(
         str(PokerHand(['SA', 'SK', 'SQ', 'DQ', 'ST']).short_score),
         "21214")
Ejemplo n.º 20
0
 def test_Hand_short_score_five_of_a_kind(self):
     self.assertEqual(
         str(PokerHand(['SA', 'SA', 'HA', 'CA', 'DA']).short_score),
         "101400")
Ejemplo n.º 21
0
 def test_Hand_short_score_straight_flush_low(self):
     self.assertEqual(
         str(PokerHand(['SA', 'S2', 'S3', 'S4', 'S5']).short_score),
         "91405")
Ejemplo n.º 22
0
 def test_Hand_short_score_full_house(self):
     self.assertEqual(
         str(PokerHand(['SA', 'SA', 'HA', 'DT', 'ST']).short_score),
         "71410")
Ejemplo n.º 23
0
 def test_Handscore_eight_card_straight_flush(self):
     self.assertEqual(
         str(
             PokerHand(['SK', 'SQ', 'SJ', 'ST', 'S9', 'S8', 'S7',
                        'S6']).score), "151312111009080706")
Ejemplo n.º 24
0
 def test_Hand_short_score_full_house_3T2A(self):
     x = ['SA', 'SA', 'CT', 'DT', 'ST']
     self.assertEqual(
         str(PokerHand(['SA', 'SA', 'CT', 'DT', 'ST']).short_score),
         "71014")
Ejemplo n.º 25
0
 def test_Handscore_straight_flush(self):
     self.assertEqual(str(PokerHand(['SA', 'SK', 'SQ', 'SJ', 'ST']).score),
                      "91413121110")
Ejemplo n.º 26
0
 def test_Hand_short_score_flush(self):
     self.assertEqual(
         str(PokerHand(['SA', 'SK', 'SQ', 'SJ', 'S4']).short_score),
         "61413")
Ejemplo n.º 27
0
 def test_Handscore_ten_of_a_kind(self):
     self.assertEqual(
         str(
             PokerHand([
                 'SA', 'SA', 'HA', 'CA', 'DA', 'CA', 'HA', 'DA', 'SA', 'HA'
             ]).score), "2014141414141414141414")
Ejemplo n.º 28
0
 def test_Hand_short_score_straight(self):
     self.assertEqual(
         str(PokerHand(['SA', 'SK', 'SQ', 'SJ', 'DT']).short_score),
         "51413")
Ejemplo n.º 29
0
 def test_Handscore_flush(self):
     self.assertEqual(str(PokerHand(['SA', 'SK', 'SQ', 'SJ', 'S4']).score),
                      "61413121104")
Ejemplo n.º 30
0
 def test_HandType_straight_flush(self):
     x = PokerHand(['SA', 'SK', 'SQ', 'SJ', 'ST'])
     self.assertEqual(str(x.get_hand_type()), "HandType.FiveSF")