aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authornatsuoto <[email protected]>2026-07-16 14:19:32 +0530
committernatsuoto <[email protected]>2026-07-16 14:19:32 +0530
commit453aea2b3ec5ae941407ac781ede7e4efda43ae8 (patch)
treeede1621e0daf6e15706595fb905c0fbc91f26dfd /tests
parentcf4a4ea68eca91aa044556806d3d91369182702c (diff)
downloadedify-453aea2b3ec5ae941407ac781ede7e4efda43ae8.tar.xz
edify-453aea2b3ec5ae941407ac781ede7e4efda43ae8.zip
test(serialize): cover the composite-value branch of _require_schema_version so PyPy and every CPython matrix entry reaches 100%
Diffstat (limited to 'tests')
-rw-r--r--tests/serialize/errors.test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/serialize/errors.test.py b/tests/serialize/errors.test.py
index 7670af4..1b7dd39 100644
--- a/tests/serialize/errors.test.py
+++ b/tests/serialize/errors.test.py
@@ -57,6 +57,12 @@ def test_non_object_json_payload_raises_non_object_json_payload_error():
Pattern.from_json("[1, 2, 3]")
+def test_incompatible_schema_version_with_composite_value_stringifies_it():
+ document = {"edify": [1, 2, 3], "pattern": {"kind": "root", "children": []}}
+ with pytest.raises(IncompatibleSchemaVersionError):
+ Pattern.from_dict(document)
+
+
def test_pattern_key_not_a_root_element_produces_empty_pattern():
document = {"edify": 0, "pattern": {"kind": "digit"}}
restored = Pattern.from_dict(document)