File tree 8 files changed +189
-1
lines changed
8 files changed +189
-1
lines changed Original file line number Diff line number Diff line change @@ -498,6 +498,13 @@ class SanityTests(unittest.TestCase):
498
498
"title" ,
499
499
"type" ,
500
500
"uniqueItems" ,
501
+
502
+ # Technically this is wrong, $comment doesn't exist in this
503
+ # draft, but the point of this test is to detect mistakes by,
504
+ # test authors, whereas the point of the $comment keyword is
505
+ # to just standardize a place for a comment, so it's not a
506
+ # mistake to use it in earlier drafts in tests per se.
507
+ "$comment" ,
501
508
},
502
509
"draft3" : {
503
510
"$ref" ,
@@ -528,6 +535,13 @@ class SanityTests(unittest.TestCase):
528
535
"title" ,
529
536
"type" ,
530
537
"uniqueItems" ,
538
+
539
+ # Technically this is wrong, $comment doesn't exist in this
540
+ # draft, but the point of this test is to detect mistakes by,
541
+ # test authors, whereas the point of the $comment keyword is
542
+ # to just standardize a place for a comment, so it's not a
543
+ # mistake to use it in earlier drafts in tests per se.
544
+ "$comment" ,
531
545
},
532
546
}
533
547
Original file line number Diff line number Diff line change 1026
1026
"valid" : false
1027
1027
}
1028
1028
]
1029
+ },
1030
+ {
1031
+ "description" : " empty tokens in $ref json-pointer" ,
1032
+ "schema" : {
1033
+ "$defs" : {
1034
+ "" : {
1035
+ "$defs" : {
1036
+ "" : { "type" : " number" }
1037
+ }
1038
+ }
1039
+ },
1040
+ "allOf" : [
1041
+ {
1042
+ "$ref" : " #/$defs//$defs/"
1043
+ }
1044
+ ]
1045
+ },
1046
+ "tests" : [
1047
+ {
1048
+ "description" : " number is valid" ,
1049
+ "data" : 1 ,
1050
+ "valid" : true
1051
+ },
1052
+ {
1053
+ "description" : " non-number is invalid" ,
1054
+ "data" : " a" ,
1055
+ "valid" : false
1056
+ }
1057
+ ]
1029
1058
}
1030
1059
]
Original file line number Diff line number Diff line change 1026
1026
"valid" : false
1027
1027
}
1028
1028
]
1029
+ },
1030
+ {
1031
+ "description" : " empty tokens in $ref json-pointer" ,
1032
+ "schema" : {
1033
+ "$defs" : {
1034
+ "" : {
1035
+ "$defs" : {
1036
+ "" : { "type" : " number" }
1037
+ }
1038
+ }
1039
+ },
1040
+ "allOf" : [
1041
+ {
1042
+ "$ref" : " #/$defs//$defs/"
1043
+ }
1044
+ ]
1045
+ },
1046
+ "tests" : [
1047
+ {
1048
+ "description" : " number is valid" ,
1049
+ "data" : 1 ,
1050
+ "valid" : true
1051
+ },
1052
+ {
1053
+ "description" : " non-number is invalid" ,
1054
+ "data" : " a" ,
1055
+ "valid" : false
1056
+ }
1057
+ ]
1029
1058
}
1030
1059
]
Original file line number Diff line number Diff line change 1026
1026
"valid" : false
1027
1027
}
1028
1028
]
1029
+ },
1030
+ {
1031
+ "description" : " empty tokens in $ref json-pointer" ,
1032
+ "schema" : {
1033
+ "$defs" : {
1034
+ "" : {
1035
+ "$defs" : {
1036
+ "" : { "type" : " number" }
1037
+ }
1038
+ }
1039
+ },
1040
+ "allOf" : [
1041
+ {
1042
+ "$ref" : " #/$defs//$defs/"
1043
+ }
1044
+ ]
1045
+ },
1046
+ "tests" : [
1047
+ {
1048
+ "description" : " number is valid" ,
1049
+ "data" : 1 ,
1050
+ "valid" : true
1051
+ },
1052
+ {
1053
+ "description" : " non-number is invalid" ,
1054
+ "data" : " a" ,
1055
+ "valid" : false
1056
+ }
1057
+ ]
1029
1058
}
1030
1059
]
Original file line number Diff line number Diff line change 559
559
"valid" : false
560
560
}
561
561
]
562
+ },
563
+ {
564
+ "description" : " empty tokens in $ref json-pointer" ,
565
+ "schema" : {
566
+ "definitions" : {
567
+ "" : {
568
+ "definitions" : {
569
+ "" : { "type" : " number" }
570
+ }
571
+ }
572
+ },
573
+ "allOf" : [
574
+ {
575
+ "$ref" : " #/definitions//definitions/"
576
+ }
577
+ ]
578
+ },
579
+ "tests" : [
580
+ {
581
+ "description" : " number is valid" ,
582
+ "data" : 1 ,
583
+ "valid" : true
584
+ },
585
+ {
586
+ "description" : " non-number is invalid" ,
587
+ "data" : " a" ,
588
+ "valid" : false
589
+ }
590
+ ]
562
591
}
563
592
]
Original file line number Diff line number Diff line change 869
869
"valid" : false
870
870
}
871
871
]
872
+ },
873
+ {
874
+ "description" : " empty tokens in $ref json-pointer" ,
875
+ "schema" : {
876
+ "definitions" : {
877
+ "" : {
878
+ "definitions" : {
879
+ "" : { "type" : " number" }
880
+ }
881
+ }
882
+ },
883
+ "allOf" : [
884
+ {
885
+ "$ref" : " #/definitions//definitions/"
886
+ }
887
+ ]
888
+ },
889
+ "tests" : [
890
+ {
891
+ "description" : " number is valid" ,
892
+ "data" : 1 ,
893
+ "valid" : true
894
+ },
895
+ {
896
+ "description" : " non-number is invalid" ,
897
+ "data" : " a" ,
898
+ "valid" : false
899
+ }
900
+ ]
872
901
}
873
902
]
Original file line number Diff line number Diff line change 983
983
"valid" : false
984
984
}
985
985
]
986
+ },
987
+ {
988
+ "description" : " empty tokens in $ref json-pointer" ,
989
+ "schema" : {
990
+ "definitions" : {
991
+ "" : {
992
+ "definitions" : {
993
+ "" : { "type" : " number" }
994
+ }
995
+ }
996
+ },
997
+ "allOf" : [
998
+ {
999
+ "$ref" : " #/definitions//definitions/"
1000
+ }
1001
+ ]
1002
+ },
1003
+ "tests" : [
1004
+ {
1005
+ "description" : " number is valid" ,
1006
+ "data" : 1 ,
1007
+ "valid" : true
1008
+ },
1009
+ {
1010
+ "description" : " non-number is invalid" ,
1011
+ "data" : " a" ,
1012
+ "valid" : false
1013
+ }
1014
+ ]
986
1015
}
987
1016
]
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ skipsdist = True
5
5
6
6
[testenv:sanity]
7
7
# used just for validating the structure of the test case files themselves
8
- deps = jsonschema ==4.17.3
8
+ deps = jsonschema ==4.18.0a4
9
9
commands = {envpython} bin/jsonschema_suite check
You can’t perform that action at this time.
0 commit comments