

def testvalidators(self):
    ev = validators.Email()
    assert vc('test@example.com')
    assert (not ev('adsf@.asdf.asdf'))
    assert validators.Length()('a')
    assert (not validators.Length(2)('a'))
    assert validators.Length(max_length=10)('abcdegf')
    assert (not validators.Length(max_length=3)('abcdegf'))
    n = validators.Number(1, 5)
    assert n(2)
    assert (not n(6))
    assert validators.Number(1)(100.0)
    assert (not validators.Number()('rawr!'))
    vc = validators.ValidatorChain(validators.Length(8), validators.Email())
    assert vc('test@example.com')
    assert (not vc('a@a.com'))
    assert (not vc('asdfasdfasdfasdfasdf'))

dataset/ETHPy150Open mimecuvalo/helloworld/packages/autumn/tests/run.py TestModels.testvalidators/VarMisuse@19/23 `ev`->`vc`