示例#1
0
    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([])
示例#2
0
 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)