def testComplicatedIsStraightFlush(self): # Possible to have cards that compose a flush and a straight, but not # a straight flush: hand = FullHand(("9s", "10c"), ("js", "qs", "ks", "5d", "2s")) self.assertTrue(hand.is_straight()) self.assertTrue(hand.is_flush()) self.assertFalse(hand.is_straight_flush())
def testIsNotFlush(self): hand = FullHand(("as", "9s"), ("qs", "jd", "4s", "6c", "8h")) self.assertFalse(hand.is_flush())
def testIsFlush(self): hand = FullHand(("as", "9s"), ("qs", "js", "4s", "6c", "jd")) self.assertTrue(hand.is_flush())
def testIsStraightFlush(self): hand = FullHand(("9s", "js"), ("10s", "ks", "qs", "9c", "jd")) self.assertTrue(hand.is_straight()) self.assertTrue(hand.is_flush()) self.assertTrue(hand.is_straight_flush())