-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e79e41
commit b7e7db5
Showing
5 changed files
with
9 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
sphinx==7.1.2 | ||
sphinx-rtd-theme==1.3.0rc1 | ||
sphinx-rtd-theme==1.3.0rc1 | ||
tulit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,8 @@ | ||
import unittest | ||
from tulit.parsers.parser import validate_xml | ||
import os | ||
|
||
file_path = os.path.join(os.path.dirname(__file__), '..\\data\\akn\\eu') | ||
|
||
|
||
class TestXMLValidator(unittest.TestCase): | ||
def setUp(self): | ||
"""Set up test paths.""" | ||
|
||
# Update these paths to match your actual file locations | ||
self.valid_xml = os.path.join(file_path, "32014L0092.akn") | ||
#self.invalid_xml = "path/to/invalid.xml" | ||
self.xsd_file = os.path.join(os.path.dirname(__file__), "..\\metadata\\schemas\\akomantoso30.xsd") | ||
|
||
# def test_valid_xml(self): | ||
# """Test validation with valid XML file.""" | ||
# is_valid, error = validate_xml(self.valid_xml, self.xsd_file) | ||
# self.assertTrue(is_valid) | ||
# self.assertIsNone(error) | ||
|
||
# def test_invalid_xml(self): | ||
# """Test validation with invalid XML file.""" | ||
# is_valid, error = validate_xml_against_xsd(self.invalid_xml, self.xsd_file) | ||
# self.assertFalse(is_valid) | ||
# self.assertIsNotNone(error) | ||
|
||
# def test_nonexistent_xml_file(self): | ||
# """Test validation with non-existent XML file.""" | ||
# is_valid, error = validate_xml("data/nonexistent.xml", self.xsd_file) | ||
# self.assertFalse(is_valid) | ||
# self.assertIsNotNone(error) | ||
|
||
# def test_nonexistent_xsd_file(self): | ||
# """Test validation with non-existent XSD schema file.""" | ||
# is_valid, error = validate_xml(self.valid_xml, "nonexistent.xsd") | ||
# self.assertFalse(is_valid) | ||
# self.assertIsNotNone(error) | ||
|
||
if __name__ == '__main__': | ||
unittest.main(verbosity=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters