Better Internat Static Typing

This commit is contained in:
2025-09-12 23:58:33 -03:00
parent 5c30e752e3
commit 5eb086bafd
10 changed files with 152 additions and 132 deletions

View File

@@ -26,6 +26,20 @@ class TestSchemaConverter(TestCase):
with self.assertRaises(ValueError):
SchemaConverter.build(schema)
def test_invalid_schema_type(self):
schema = {
"title": 1,
"description": "A person",
"type": 1,
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"},
},
}
with self.assertRaises(ValueError):
SchemaConverter.build(schema)
def test_build_expects_title(self):
schema = {
"description": "A person",