コード例 #1
0
ファイル: test_utils.py プロジェクト: patymori/packtools
 def test_non_existing_filepath(self):
     path = list(self.sch_schemas.values())[0] + '.notexists'
     self.assertRaises(ValueError,
                       lambda: utils.resolve_schematron_filepath(path))
コード例 #2
0
ファイル: test_utils.py プロジェクト: patymori/packtools
 def test_non_existing_builtin(self):
     self.assertRaises(
         ValueError,
         lambda: utils.resolve_schematron_filepath('@notexists'))
コード例 #3
0
ファイル: test_utils.py プロジェクト: patymori/packtools
 def test_existing_filepath(self):
     path = list(self.sch_schemas.values())[0]  # get the first item
     self.assertEqual(utils.resolve_schematron_filepath(path), path)
コード例 #4
0
ファイル: test_utils.py プロジェクト: patymori/packtools
 def test_builtin_lookup(self):
     for name, path in self.sch_schemas.items():
         self.assertEqual(utils.resolve_schematron_filepath('@' + name),
                          path)
コード例 #5
0
ファイル: test_utils.py プロジェクト: patymori/packtools
 def test_resolve_unsupported_types(self):
     self.assertRaises(TypeError,
                       lambda: utils.resolve_schematron_filepath(None))
コード例 #6
0
 def test_non_existing_filepath(self):
     path = list(self.sch_schemas.values())[0] + '.notexists'
     self.assertRaises(ValueError, 
             lambda: utils.resolve_schematron_filepath(path))
コード例 #7
0
 def test_existing_filepath(self):
     path = list(self.sch_schemas.values())[0]  # get the first item
     self.assertEqual(utils.resolve_schematron_filepath(path), path)
コード例 #8
0
 def test_non_existing_builtin(self):
     self.assertRaises(ValueError, 
             lambda: utils.resolve_schematron_filepath('@notexists'))
コード例 #9
0
 def test_resolve_unsupported_types(self):
     self.assertRaises(TypeError,
             lambda: utils.resolve_schematron_filepath(None))
コード例 #10
0
 def test_builtin_lookup(self):
     for name, path in self.sch_schemas.items():
         self.assertEqual(utils.resolve_schematron_filepath('@'+name), path)