@@ -1310,14 +1310,16 @@ def test_schema_esg_grid_rundir(esg_grid_prop):
13101310# execution-parallel
13111311
13121312
1313- def test_schema_parallel_execution ():
1313+ def test_schema_execution_parallel ():
13141314 config = {"executable" : "fv3" }
13151315 batchargs = {"batchargs" : {"queue" : "string" , "walltime" : "string" }}
13161316 mpiargs = {"mpiargs" : ["--flag1" , "--flag2" ]}
13171317 threads = {"threads" : 32 }
13181318 errors = schema_validator ("execution-parallel" )
13191319 # Basic correctness:
13201320 assert not errors (config )
1321+ # execution is required:
1322+ assert "'executable' is a required property" in errors ({})
13211323 # batchargs may optionally be specified:
13221324 assert not errors ({** config , ** batchargs })
13231325 # mpiargs may be optionally specified:
@@ -1332,15 +1334,17 @@ def test_schema_parallel_execution():
13321334 )
13331335
13341336
1335- def test_schema_parallel_execution_executable ():
1337+ def test_schema_execution_parallel__executable ():
13361338 errors = schema_validator ("execution-parallel" , "properties" , "executable" )
13371339 # String value is ok:
13381340 assert not errors ("fv3.exe" )
1341+ # Null value is ok:
1342+ assert not errors (None )
13391343 # Anything else is not:
1340- assert "42 is not of type 'string'\n " in errors (42 )
1344+ assert "42 is not of type 'null', ' string'\n " in errors (42 )
13411345
13421346
1343- def test_schema_parallel_execution_mpiargs ():
1347+ def test_schema_execution_parallel__mpiargs ():
13441348 errors = schema_validator ("execution-parallel" , "properties" , "mpiargs" )
13451349 # Basic correctness:
13461350 assert not errors (["string1" , "string2" ])
@@ -1350,7 +1354,7 @@ def test_schema_parallel_execution_mpiargs():
13501354 assert "42 is not of type 'string'\n " in errors (["string1" , 42 ])
13511355
13521356
1353- def test_schema_parallel_execution_threads ():
1357+ def test_schema_execution_parallel__threads ():
13541358 errors = schema_validator ("execution-parallel" , "properties" , "threads" )
13551359 # threads must be non-negative, and an integer:
13561360 assert not errors (1 )
@@ -1368,6 +1372,8 @@ def test_schema_execution_serial():
13681372 errors = schema_validator ("execution-serial" )
13691373 # Basic correctness:
13701374 assert not errors (config )
1375+ # execution is required:
1376+ assert "'executable' is a required property" in errors ({})
13711377 # batchargs may optionally be specified:
13721378 assert not errors ({** config , ** batchargs })
13731379 # All properties are ok:
@@ -1376,6 +1382,16 @@ def test_schema_execution_serial():
13761382 assert "Additional properties are not allowed" in errors ({** config , "foo" : "bar" })
13771383
13781384
1385+ def test_schema_execution_serial__executable ():
1386+ errors = schema_validator ("execution-serial" , "properties" , "executable" )
1387+ # String value is ok:
1388+ assert not errors ("fv3.exe" )
1389+ # Null value is ok:
1390+ assert not errors (None )
1391+ # Anything else is not:
1392+ assert "42 is not of type 'null', 'string'\n " in errors (42 )
1393+
1394+
13791395# files-to-stage
13801396
13811397
0 commit comments