Skip to content

Commit caf4cd3

Browse files
committed
include json roundtrip in test_json_schema_is_up_to_date()
1 parent 7ad9fe8 commit caf4cd3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import json
2+
13
from deepdiff.diff import DeepDiff
24

35

@@ -6,6 +8,9 @@ def test_json_schema_is_up_to_date():
68
from bioimageio.spec.utils import get_bioimageio_json_schema
79

810
generated = generate_json_schema()
11+
# encode and decode with json for exact match, e.g. json turns int into float
12+
generated_json_roundtrip = json.loads(json.dumps(generated))
13+
914
existing = get_bioimageio_json_schema()
10-
diff = DeepDiff(existing, generated)
15+
diff = DeepDiff(existing, generated_json_roundtrip)
1116
assert not diff, diff.pretty()

0 commit comments

Comments
 (0)