コード例 #1
0
 def test_throw_exception_on_vtt2srt_exception(self, mock_communicate):
     try:
         Undertest.vtt2srt(self.__real_vtt_path, "output")
     except Exception as e:
         self.assertTrue(mock_communicate.called)
         self.assertTrue(isinstance(e, TerminalException))
     else:
         self.fail("Should have thrown exception")
コード例 #2
0
    def test_vtt2srt(self):
        output_file_path = os.path.join(self.__resource_tmp, "converted.srt")

        Undertest.vtt2srt(self.__real_vtt_path, output_file_path)

        self.assertTrue(filecmp.cmp(self.__real_srt_path, output_file_path))
コード例 #3
0
ファイル: test_utils.py プロジェクト: seainm/subaligner
 def test_throw_exception_on_vtt2srt_exception(self, mock_communicate):
     self._assert_exception_on_subproces(lambda: Undertest.vtt2srt(self.__real_vtt_path, "output"), mock_communicate)