def test_cardIndexToSuitWithScore(self): expected = (0, 14, 1) actual = CardList.cardIndexToSuitWithScorePlayerID(1, 1) self.assertEqual(expected, actual) expected = (0, 13, 1) actual = CardList.cardIndexToSuitWithScorePlayerID(13, 1) self.assertEqual(expected, actual) expected = (2, 13, 2) actual = CardList.cardIndexToSuitWithScorePlayerID(39, 2) self.assertEqual(expected, actual)
def test_max(self): cl = CardList() cl.push(1, 0) cl.push(13, 1) cl.push(19, 2) cl.push(41, 3) expected = 0 self.assertEqual(expected, cl.max())
def test_push(self): cl = CardList() for i in range(1,10): cl.push(i, 1) self.assertEqual(4, len(cl.get()))