def main(): imported_files = [] os.path.walk('./test/imported', filter_all, imported_files) failed_to_autodetect = [] failed_to_parse = [] for file_path in imported_files: try: # test autodetection format = Upconverter.autodetect(file_path) try: # test conversion data = Upconverter.parse(file_path, format) except Exception, e: failed_to_parse.append(file_path) print traceback.print_exc() except Exception, e: failed_to_autodetect.append(file_path) print traceback.print_exc()
def main(): imported_files = [] os.path.walk('./test/imported', filter_all, imported_files) failed_to_autodetect = [] failed_to_parse = [] for file_path in imported_files: try: # test autodetection format = Upconverter.autodetect(file_path) try: # test conversion data = Upconverter.parse(file_path, format) except Exception, e: failed_to_parse.append(file_path) print traceback.print_exc() except Exception, e: failed_to_autodetect.append(file_path) print traceback.print_exc()
def test(self): self.assertEqual(Upconverter.autodetect(file_path), format)
def test(self): self.assertEqual(Upconverter.autodetect(file_path), format)