def test_mustgivestr(self): with self.assertRaises(TypeError): imdb.getseasons([]) with self.assertRaises(TypeError): imdb.getnumseasons([]) with self.assertRaises(TypeError): imdb.getepisodes([]) with self.assertRaises(TypeError): imdb.getnumepisodes([]) with self.assertRaises(TypeError): imdb.getshow([])
def test_getepisodes(self): episodes = imdb.getepisodes(self.showname, 1) self.assertGreaterEqual(len(episodes), self.numepisodes[0]) for episode in episodes: self.assertIsInstance(episode, Episode)