class TestGame(unittest.TestCase): def setUp(self): self.test_game = Game("Other Team", 42) def tearDown(self): self.test_game = None def test_getTeam2(self): self.assertEqual(self.test_game.getTeam2(), "Other Team") def test_getScoreDiff(self): self.assertEqual(self.test_game.getScoreDiff(), 42)
def insert(self, team2, scoreDiff): curr = self.tail curr.next = Game(team2, scoreDiff) self.tail = curr.next self._size += 1
def setUp(self): self.test_game = Game("Other Team", 42)