def __init__ (self, cards) : ''' Give the player random name ''' #possible names names = ["Christian", "Erlend", "Ola", "Tommy Woa", "Merethe<3", "Benny", "Janis"] # set the deck of the player self.cards = cards self.points = Pointcalc_Poker.calculatePoints(cards) #set the random name self.name = names[randint(0, 6)]
def test_testCalculatePoints_testPair(self): self.assertEqual(Pointcalc_Poker.checkPair(self.cards), 112)
def test_testCalculatePoints_FourOfAKind_2(self): self.assertEqual(Pointcalc_Poker.checkFourOfaKind(self.cards), 0)
def test_testCalculatePoints_FourOfAKind(self): global pokerCards self.assertEqual(Pointcalc_Poker.checkFourOfaKind(self.pokerCards), 160002)
def test_testCalculatePoints_StraightFlush(self): self.assertEqual(Pointcalc_Poker.checkStraightFlush(self.pokerCards), 480000)
def test_testCalculatePoints_ThreeOfAKind(self): self.assertEqual(Pointcalc_Poker.checkThreeOfaKind(self.pokerCards), 80040)
def test_testCalculatePoints_royalFLush(self): self.assertEqual(Pointcalc_Poker.checkRoyalFlush(self.pokerCards), 500000)
def test_testCalcualtePoints7(self): self.assertEqual(Pointcalc_Poker.checkStraight(self.pokerCards), 100004)
def test_testCalculatePoints_flush2(self): self.assertEqual(Pointcalc_Poker.calculatePoints(self.pokerCards2), 29)
def test_testCalculatePoints_flush(self): self.assertEqual(Pointcalc_Poker.calculatePoints(self.pokerCards), 120000)
def test_testCalculatePoints_TestFullHouse(self): self.assertEqual(Pointcalc_Poker.checkFullHouse(self.cards), 140000)