def testJ_NoDuplicatesInStraight(self): '''no duplicate faces in a straight''' hand = cards('1C,2C,3C,4C,5H,7D,7H') self.assertEqual(straight(hand), cards('5H,4C,3C,2C,1C'))
def testH_UseTheHighestStraight(self): '''take the highest straight''' hand = cards('1D,2D,3C,4C,5H,6H') self.assertEqual(straight(hand), cards('6H,5H,4C,3C,2D'))
def testI_NoGapsAllowed(self): '''no gaps in a straight''' hand = cards('1D,2D,3C,4C,5H,7H') self.assertEqual(straight(hand), cards('5H,4C,3C,2D,1D'))
def testG_Straight(self): '''a straight''' hand = cards('1H,2C,3H,4S,5D') self.assertEqual(straight(hand), cards('5D,4S,3H,2C,1H'))