Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/n/e/NeuroTools-0.2.0/test/test_validators.py   NeuroTools(Download)
        v = CongruencyValidator()
        # test Eval which checks for isinstance(x,list)
        s1.mylist = NeuroTools.parameters.validators.Eval('isinstance(x,list)',var='x')
        assert v.validate(ps3,s1)==True
 
        # test default var 'leaf'
        s1.hello = NeuroTools.parameters.validators.Eval('isinstance(leaf,str)')
 
        # test failure and var as non-kwarg
        s1.mylist = NeuroTools.parameters.validators.Eval('isinstance(x,str)','x')
 
        r = False