Esempio n. 1
0
 def test_is_straight(self):
     poker = Poker()
     poker.new_game(['S6', 'D2', 'H3', 'C4', 'C5'])
     assert poker.is_straight() == True
     poker.new_game(['SA', 'D2', 'H3', 'C4', 'C5'])
     assert poker.is_straight() == True
     poker.new_game(['SA', 'DJ', 'HQ', 'CK', 'CT'])
     assert poker.is_straight() == True
     poker.new_game(['SA', 'DJ', 'HQ', 'CK', 'C9'])
     assert poker.is_straight() == False
     poker.new_game(('S2', 'D2', 'H3', 'C3', 'C5'))
     assert poker.is_straight() == False
Esempio n. 2
0
 def test_is_straight(self):
     poker = Poker()
     poker.new_game(["S6", "D2", "H3", "C4", "C5"])
     assert poker.is_straight() == True
     poker.new_game(["SA", "D2", "H3", "C4", "C5"])
     assert poker.is_straight() == True
     poker.new_game(["SA", "DJ", "HQ", "CK", "CT"])
     assert poker.is_straight() == True
     poker.new_game(["SA", "DJ", "HQ", "CK", "C9"])
     assert poker.is_straight() == False
     poker.new_game(("S2", "D2", "H3", "C3", "C5"))
     assert poker.is_straight() == False