Skip to content

Commit 3014c4c

Browse files
committed
Add covering test
1 parent ed435de commit 3014c4c

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

tests/test_canonicalise.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,20 +203,12 @@ def test_canonicalises_to_empty(schema):
203203
{"type": ["number", "string", "array"]},
204204
),
205205
(
206-
{
207-
"anyOf": [
208-
{"type": "integer"},
209-
{"type": "number"},
210-
]
211-
},
206+
{"anyOf": [{"type": "integer"}, {"type": "number"}]},
212207
{"type": "number"},
213208
),
214209
(
215210
{
216-
"anyOf": [
217-
{"type": "string"},
218-
{"type": "number"},
219-
],
211+
"anyOf": [{"type": "string"}, {"type": "number"}],
220212
"type": ["string", "object"],
221213
},
222214
{"type": "string"},
@@ -258,6 +250,16 @@ def test_canonicalises_to_empty(schema):
258250
"maxItems": 1,
259251
},
260252
),
253+
(
254+
{
255+
"anyOf": [
256+
{"const": "a"},
257+
{"anyOf": [{"anyOf": [{"const": "c"}]}, {"const": "b"}]},
258+
]
259+
},
260+
# TODO: could be {"enum": ["a", "b", "c"]},
261+
{"anyOf": [{"const": "a"}, {"const": "b"}, {"const": "c"}]},
262+
),
261263
],
262264
)
263265
def test_canonicalises_to_expected(schema, expected):

0 commit comments

Comments
 (0)