當前位置: 首頁>>代碼示例>>Python>>正文


Python validator.Validator類代碼示例

本文整理匯總了Python中aeneas.validator.Validator的典型用法代碼示例。如果您正苦於以下問題:Python Validator類的具體用法?Python Validator怎麽用?Python Validator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Validator類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_check_task_configuration_19

 def test_check_task_configuration_19(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "task_language=it|is_text_type=unparsed|is_text_unparsed_class_regex=ra|is_text_unparsed_id_regex=f[0-9]*|os_task_file_name=output.txt|os_task_file_format=txt"
     result = validator.check_task_configuration(string)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例2: test_check_task_configuration_20

 def test_check_task_configuration_20(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "task_language=it|is_text_type=plain|os_task_file_name=output.txt|os_task_file_format=smil|os_task_file_smil_page_ref=page.xhtml|os_task_file_smil_audio_ref=../Audio/audio.mp3"
     result = validator.check_task_configuration(string)
     self.assertTrue(result.passed)
     self.assertEqual(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例3: test_check_task_configuration_08

 def test_check_task_configuration_08(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "task_language=it|is_text_type=plain|missing=other"
     result = validator.check_task_configuration(string)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例4: test_check_task_configuration_16

 def test_check_task_configuration_16(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "task_language=it|is_text_type=unparsed|is_text_unparsed_id_regex=f[0-9]*|is_text_unparsed_id_sort=numeric|os_task_file_name=output.txt|os_task_file_format=txt"
     result = validator.check_task_configuration(string)
     self.assertTrue(result.passed)
     self.assertEqual(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例5: test_check_task_configuration_06

 def test_check_task_configuration_06(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "not=relevant|config=string"
     result = validator.check_task_configuration(string)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例6: test_check_job_configuration_17

 def test_check_job_configuration_17(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "job_language=it|os_job_file_name=output.zip|os_job_file_container=zip|os_job_file_hierarchy_type=flat"
     result = validator.check_job_configuration(string)
     self.assertTrue(result.passed)
     self.assertEqual(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例7: test_check_job_configuration_14

 def test_check_job_configuration_14(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "job_language=it|os_job_file_name=output.zip|os_job_file_container=zip|is_hierarchy_type=paged"
     result = validator.check_job_configuration(string)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例8: test_check_task_configuration_23

 def test_check_task_configuration_23(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "task_language=it|is_text_type=plain|os_task_file_name=output.txt|os_task_file_format=smil"
     result = validator.check_task_configuration(string)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例9: test_check_job_configuration_02

 def test_check_job_configuration_02(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "dummy config string with ~ reserved characters"
     result = validator.check_job_configuration(string)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例10: test_check_job_configuration_07

 def test_check_job_configuration_07(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "job_language=it|missing=other"
     result = validator.check_job_configuration(string)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例11: test_check_job_configuration_08

 def test_check_job_configuration_08(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "job_language=it|os_job_file_name=output.zip"
     result = validator.check_job_configuration(string)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例12: test_check_container_xml_05

 def test_check_container_xml_05(self):
     logger = Logger()
     validator = Validator(logger=logger)
     container_path = get_abs_path("res/validator/job_xml_config_bad_4")
     result = validator.check_container(container_path)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例13: test_check_job_configuration_05

 def test_check_job_configuration_05(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = "malformed="
     result = validator.check_job_configuration(string)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例14: test_check_job_configuration_01

 def test_check_job_configuration_01(self):
     logger = Logger()
     validator = Validator(logger=logger)
     string = u"dummy config string with bad encoding é".encode("latin-1")
     result = validator.check_job_configuration(string)
     self.assertFalse(result.passed)
     self.assertGreater(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py

示例15: test_check_container_xml_07

 def test_check_container_xml_07(self):
     logger = Logger()
     validator = Validator(logger=logger)
     container_path = get_abs_path("res/validator/job_xml_config_not_root_nested")
     result = validator.check_container(container_path)
     self.assertTrue(result.passed)
     self.assertEqual(len(result.errors), 0)
開發者ID:cbeer,項目名稱:aeneas,代碼行數:7,代碼來源:test_validator.py


注:本文中的aeneas.validator.Validator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。