MCPcopy
hub / github.com/marshmallow-code/marshmallow / Schema2

Class Schema2

tests/test_decorators.py:342–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340
341 def test_precedence(self):
342 class Schema2(ValidatesSchema):
343 foo = fields.Int(validate=predicate(lambda n: n != 42))
344 bar = fields.Int(validate=validate.Equal(1))
345
346 @validates("bar")
347 def validate_bar(self, value, **kwargs):
348 if value != 2:
349 raise ValidationError("Must be 2")
350
351 schema = Schema2()
352

Callers 1

test_precedenceMethod · 0.70

Calls 1

predicateFunction · 0.90

Tested by 1

test_precedenceMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…