Skip to content

Commit 771ff41

Browse files
authored
Merge pull request #430 from vladistan/convert-test-include-schema-to-pytest
Convert test_include_schema.py to pytest format
2 parents 5f963b1 + b141c63 commit 771ff41

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import unittest
2-
31
from linkml_runtime.linkml_model.meta import SchemaDefinition
42
from linkml_runtime.loaders import yaml_loader
53
from tests.test_issues.environment import env
64

75
# https://github.com/linkml/linkml/issues/3
86

97

10-
class IncludeSchemaTestCase(unittest.TestCase):
11-
"""include_schema.yaml produces a Python exception on an uncaught error"""
12-
13-
# "Awaiting fix for issue #3"
14-
def test_include_schema(self):
15-
inp = yaml_loader.load(env.input_path("include_schema.yaml"), SchemaDefinition)
8+
def test_include_schema():
9+
"""
10+
Test for GitHub issue #3: include_schema.yaml produces a Python exception on an uncaught error
1611
12+
This is a regression test to ensure schema inclusion works without throwing exceptions.
13+
"""
14+
# Load schema file - this should not raise an exception
15+
inp = yaml_loader.load(env.input_path("include_schema.yaml"), SchemaDefinition)
1716

18-
if __name__ == "__main__":
19-
unittest.main()
17+
# Verify the schema was loaded successfully
18+
assert inp is not None
19+
assert isinstance(inp, SchemaDefinition)

0 commit comments

Comments
 (0)