File tree Expand file tree Collapse file tree 7 files changed +220
-1
lines changed Expand file tree Collapse file tree 7 files changed +220
-1
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,10 @@ def main(arguments):
195195parser = argparse .ArgumentParser (
196196 description = "JSON Schema Test Suite utilities" ,
197197)
198- subparsers = parser .add_subparsers (help = "utility commands" , dest = "command" )
198+ subparsers = parser .add_subparsers (
199+ help = "utility commands" , dest = "command" , metavar = "COMMAND"
200+ )
201+ subparsers .required = True
199202
200203check = subparsers .add_parser ("check" , help = "Sanity check the test suite." )
201204
Original file line number Diff line number Diff line change 593593 "valid" : false
594594 }
595595 ]
596+ },
597+ {
598+ "description" : " non-array instances are valid" ,
599+ "schema" : {"unevaluatedItems" : false },
600+ "tests" : [
601+ {
602+ "description" : " ignores booleans" ,
603+ "data" : true ,
604+ "valid" : true
605+ },
606+ {
607+ "description" : " ignores integers" ,
608+ "data" : 123 ,
609+ "valid" : true
610+ },
611+ {
612+ "description" : " ignores floats" ,
613+ "data" : 1.0 ,
614+ "valid" : true
615+ },
616+ {
617+ "description" : " ignores objects" ,
618+ "data" : {},
619+ "valid" : true
620+ },
621+ {
622+ "description" : " ignores strings" ,
623+ "data" : " foo" ,
624+ "valid" : true
625+ },
626+ {
627+ "description" : " ignores null" ,
628+ "data" : null ,
629+ "valid" : true
630+ }
631+ ]
596632 }
597633]
Original file line number Diff line number Diff line change 13561356 "valid" : false
13571357 }
13581358 ]
1359+ },
1360+ {
1361+ "description" : " non-object instances are valid" ,
1362+ "schema" : {"unevaluatedProperties" : false },
1363+ "tests" : [
1364+ {
1365+ "description" : " ignores booleans" ,
1366+ "data" : true ,
1367+ "valid" : true
1368+ },
1369+ {
1370+ "description" : " ignores integers" ,
1371+ "data" : 123 ,
1372+ "valid" : true
1373+ },
1374+ {
1375+ "description" : " ignores floats" ,
1376+ "data" : 1.0 ,
1377+ "valid" : true
1378+ },
1379+ {
1380+ "description" : " ignores arrays" ,
1381+ "data" : [],
1382+ "valid" : true
1383+ },
1384+ {
1385+ "description" : " ignores strings" ,
1386+ "data" : " foo" ,
1387+ "valid" : true
1388+ },
1389+ {
1390+ "description" : " ignores null" ,
1391+ "data" : null ,
1392+ "valid" : true
1393+ }
1394+ ]
13591395 }
13601396]
Original file line number Diff line number Diff line change 485485 "valid" : false
486486 }
487487 ]
488+ },
489+ {
490+ "description" : " non-array instances are valid" ,
491+ "schema" : {"unevaluatedItems" : false },
492+ "tests" : [
493+ {
494+ "description" : " ignores booleans" ,
495+ "data" : true ,
496+ "valid" : true
497+ },
498+ {
499+ "description" : " ignores integers" ,
500+ "data" : 123 ,
501+ "valid" : true
502+ },
503+ {
504+ "description" : " ignores floats" ,
505+ "data" : 1.0 ,
506+ "valid" : true
507+ },
508+ {
509+ "description" : " ignores objects" ,
510+ "data" : {},
511+ "valid" : true
512+ },
513+ {
514+ "description" : " ignores strings" ,
515+ "data" : " foo" ,
516+ "valid" : true
517+ },
518+ {
519+ "description" : " ignores null" ,
520+ "data" : null ,
521+ "valid" : true
522+ }
523+ ]
488524 }
489525]
Original file line number Diff line number Diff line change 13071307 "valid" : false
13081308 }
13091309 ]
1310+ },
1311+ {
1312+ "description" : " non-object instances are valid" ,
1313+ "schema" : {"unevaluatedProperties" : false },
1314+ "tests" : [
1315+ {
1316+ "description" : " ignores booleans" ,
1317+ "data" : true ,
1318+ "valid" : true
1319+ },
1320+ {
1321+ "description" : " ignores integers" ,
1322+ "data" : 123 ,
1323+ "valid" : true
1324+ },
1325+ {
1326+ "description" : " ignores floats" ,
1327+ "data" : 1.0 ,
1328+ "valid" : true
1329+ },
1330+ {
1331+ "description" : " ignores arrays" ,
1332+ "data" : [],
1333+ "valid" : true
1334+ },
1335+ {
1336+ "description" : " ignores strings" ,
1337+ "data" : " foo" ,
1338+ "valid" : true
1339+ },
1340+ {
1341+ "description" : " ignores null" ,
1342+ "data" : null ,
1343+ "valid" : true
1344+ }
1345+ ]
13101346 }
13111347]
Original file line number Diff line number Diff line change 593593 "valid" : false
594594 }
595595 ]
596+ },
597+ {
598+ "description" : " non-array instances are valid" ,
599+ "schema" : {"unevaluatedItems" : false },
600+ "tests" : [
601+ {
602+ "description" : " ignores booleans" ,
603+ "data" : true ,
604+ "valid" : true
605+ },
606+ {
607+ "description" : " ignores integers" ,
608+ "data" : 123 ,
609+ "valid" : true
610+ },
611+ {
612+ "description" : " ignores floats" ,
613+ "data" : 1.0 ,
614+ "valid" : true
615+ },
616+ {
617+ "description" : " ignores objects" ,
618+ "data" : {},
619+ "valid" : true
620+ },
621+ {
622+ "description" : " ignores strings" ,
623+ "data" : " foo" ,
624+ "valid" : true
625+ },
626+ {
627+ "description" : " ignores null" ,
628+ "data" : null ,
629+ "valid" : true
630+ }
631+ ]
596632 }
597633]
Original file line number Diff line number Diff line change 13071307 "valid" : false
13081308 }
13091309 ]
1310+ },
1311+ {
1312+ "description" : " non-object instances are valid" ,
1313+ "schema" : {"unevaluatedProperties" : false },
1314+ "tests" : [
1315+ {
1316+ "description" : " ignores booleans" ,
1317+ "data" : true ,
1318+ "valid" : true
1319+ },
1320+ {
1321+ "description" : " ignores integers" ,
1322+ "data" : 123 ,
1323+ "valid" : true
1324+ },
1325+ {
1326+ "description" : " ignores floats" ,
1327+ "data" : 1.0 ,
1328+ "valid" : true
1329+ },
1330+ {
1331+ "description" : " ignores arrays" ,
1332+ "data" : [],
1333+ "valid" : true
1334+ },
1335+ {
1336+ "description" : " ignores strings" ,
1337+ "data" : " foo" ,
1338+ "valid" : true
1339+ },
1340+ {
1341+ "description" : " ignores null" ,
1342+ "data" : null ,
1343+ "valid" : true
1344+ }
1345+ ]
13101346 }
13111347]
You can’t perform that action at this time.
0 commit comments