File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,20 @@ def test_list_instead_of_nested_schema(unet2d_nuclei_broad_latest):
1111 data ["run_mode" ] = [{"name" : "something" }]
1212
1313 error = validate (data )["error" ]
14- print (error )
1514 assert len (error ) == 1
1615 assert error ["run_mode" ] == ["Expected dictionary, but got list." ]
16+
17+
18+ def test_forward_compatibility_error (unet2d_fixed_shape ):
19+ from bioimageio .spec .commands import validate
20+
21+ data = yaml .load (unet2d_fixed_shape )
22+
23+ data ["authors" ] = 42 # make sure rdf is invalid
24+ data ["format_version" ] = "9999.0.0" # assume it is valid in a future format version
25+
26+ error = validate (data )["error" ]
27+
28+ # even though the format version is correctly formatted, it should be mentioned here as we treat the future format
29+ # version as the current latest. If this attempted forward compatibility fails we have to report that we did it.
30+ assert "format_version" in error
You can’t perform that action at this time.
0 commit comments