Ejemplo n.º 1
0
 def test_extract_srt(self):
     x = MKVExtractor()
     sub_track = x.getSubTrack(movie_path)
     x.startExtract(movie_path, sub_track)
     
     self.assertTrue(x.isRunning())
     self.assertTrue(x.progress < 100)
     
     prevProgress = 0
     while x.isRunning():
         #self.assertTrue(x.getSubFile() == None)
         self.assertTrue(x.progress >= prevProgress)
         print "Progress: %d" % x.progress
         prevProgress = x.progress
         time.sleep(.1)
         
     self.assertEqual(x.progress, 100)
     
     sub_file = x.getSubFile()
     self.assertTrue(sub_file is not None)
     self.assertTrue(os.path.isfile(sub_file))
Ejemplo n.º 2
0
 def test_get_track(self):
     x = MKVExtractor()
     sub_track = x.getSubTrack(movie_path)
     self.assertEqual(sub_track, 3)