def test_DealHand_TwoPlayers(self): x = GameController() p1 = Player("Mike") p2 = Player("John") x.Players = [p1, p2] table = x.DealHand() self.assertEqual(len(p1.Hand), 6) self.assertEqual(len(p2.Hand), 6) self.assertEqual(len(table['crib']), 0) self.assertIsInstance(table['cut'], Card)
def test_DealHand_ThreePlayers(self): x = GameController() p1 = Player("Mike") p2 = Player("John") p3 = Player("Jim") x.Players = [p1, p2, p3] table = x.DealHand() self.assertEqual(len(p1.Hand), 5) self.assertEqual(len(p2.Hand), 5) self.assertEqual(len(p3.Hand), 5) self.assertEqual(len(table['crib']), 1) self.assertIsInstance(table['cut'], Card)