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()
예제 #2
0
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()
예제 #3
0
 def test(self):
     self.assertEqual(Upconverter.autodetect(file_path), format)
예제 #4
0
 def test(self):
     self.assertEqual(Upconverter.autodetect(file_path), format)