@@ -83,7 +83,7 @@ def test_iter_errors(self):
8383 schema = {
8484 u"disallow" : u"array" ,
8585 u"enum" : [["a" , "b" , "c" ], ["d" , "e" , "f" ]],
86- u"minItems" : 3
86+ u"minItems" : 3 ,
8787 }
8888
8989 got = (e .message for e in self .validator .iter_errors (instance , schema ))
@@ -101,7 +101,7 @@ def test_iter_errors_multiple_failures_one_validator(self):
101101 "foo" : {u"type" : "string" },
102102 "bar" : {u"minItems" : 2 },
103103 "baz" : {u"maximum" : 10 , u"enum" : [2 , 4 , 6 , 8 ]},
104- }
104+ },
105105 }
106106
107107 errors = list (self .validator .iter_errors (instance , schema ))
@@ -200,8 +200,8 @@ def test_anyOf(self):
200200 schema = {
201201 "anyOf" : [
202202 {"minimum" : 20 },
203- {"type" : "string" }
204- ]
203+ {"type" : "string" },
204+ ],
205205 }
206206
207207 validator = Draft4Validator (schema )
@@ -268,11 +268,9 @@ def test_type(self):
268268 {"type" : "integer" },
269269 {
270270 "type" : "object" ,
271- "properties" : {
272- "foo" : {"enum" : [2 ]}
273- }
274- }
275- ]
271+ "properties" : {"foo" : {"enum" : [2 ]}},
272+ },
273+ ],
276274 }
277275
278276 validator = Draft3Validator (schema )
@@ -344,7 +342,7 @@ def test_single_nesting(self):
344342 "foo" : {"type" : "string" },
345343 "bar" : {"minItems" : 2 },
346344 "baz" : {"maximum" : 10 , "enum" : [2 , 4 , 6 , 8 ]},
347- }
345+ },
348346 }
349347
350348 validator = Draft3Validator (schema )
@@ -384,10 +382,10 @@ def test_multiple_nesting(self):
384382 "properties" : {
385383 "bar" : {"required" : True },
386384 "baz" : {"minItems" : 2 },
387- }
388- }
389- }
390- }
385+ },
386+ },
387+ },
388+ },
391389 }
392390
393391 validator = Draft3Validator (schema )
@@ -450,9 +448,7 @@ def test_recursive(self):
450448 },
451449 "type" : "object" ,
452450 "required" : ["root" ],
453- "properties" : {
454- "root" : {"$ref" : "#/definitions/node" },
455- }
451+ "properties" : {"root" : {"$ref" : "#/definitions/node" }},
456452 }
457453
458454 instance = {
@@ -465,8 +461,8 @@ def test_recursive(self):
465461 "ab" : {
466462 "name" : "ab" ,
467463 # missing "children"
468- }
469- }
464+ },
465+ },
470466 },
471467 },
472468 },
@@ -520,16 +516,14 @@ def test_recursive(self):
520516 "children" ,
521517 "patternProperties" ,
522518 "^.*$" ,
523- "anyOf"
519+ "anyOf" ,
524520 ],
525521 ),
526522 )
527523
528524 def test_additionalProperties (self ):
529525 instance = {"bar" : "bar" , "foo" : 2 }
530- schema = {
531- "additionalProperties" : {"type" : "integer" , "minimum" : 5 }
532- }
526+ schema = {"additionalProperties" : {"type" : "integer" , "minimum" : 5 }}
533527
534528 validator = Draft3Validator (schema )
535529 errors = validator .iter_errors (instance )
@@ -546,8 +540,8 @@ def test_patternProperties(self):
546540 schema = {
547541 "patternProperties" : {
548542 "bar" : {"type" : "string" },
549- "foo" : {"minimum" : 5 }
550- }
543+ "foo" : {"minimum" : 5 },
544+ },
551545 }
552546
553547 validator = Draft3Validator (schema )
@@ -564,7 +558,7 @@ def test_additionalItems(self):
564558 instance = ["foo" , 1 ]
565559 schema = {
566560 "items" : [],
567- "additionalItems" : {"type" : "integer" , "minimum" : 5 }
561+ "additionalItems" : {"type" : "integer" , "minimum" : 5 },
568562 }
569563
570564 validator = Draft3Validator (schema )
@@ -581,7 +575,7 @@ def test_additionalItems_with_items(self):
581575 instance = ["foo" , "bar" , 1 ]
582576 schema = {
583577 "items" : [{}],
584- "additionalItems" : {"type" : "integer" , "minimum" : 5 }
578+ "additionalItems" : {"type" : "integer" , "minimum" : 5 },
585579 }
586580
587581 validator = Draft3Validator (schema )
0 commit comments