Did I find the right examples for you? yes no

All Samples(44)  |  Call(42)  |  Derive(0)  |  Import(2)

src/o/e/oe-core-HEAD/meta/lib/oe/data.py   oe-core(Download)
 
    try:
        return oe.maketype.create(d.getVar(key, True) or '', var_type, **flags)
    except (TypeError, ValueError), exc:
        bb.msg.fatal("Data", "%s: %s" % (key, str(exc)))

src/p/o/poky-HEAD/meta/lib/oe/data.py   poky(Download)
 
    try:
        return oe.maketype.create(d.getVar(key, True) or '', var_type, **flags)
    except (TypeError, ValueError), exc:
        bb.msg.fatal("Data", "%s: %s" % (key, str(exc)))

src/o/e/oe-core-HEAD/meta/lib/oe/tests/test_types.py   oe-core(Download)
import unittest
from oe.maketype import create, factory
 
class TestTypes(unittest.TestCase):
    def assertIsInstance(self, obj, cls):
    def assertFactoryCreated(self, value, type, **flags):
        cls = factory(type)
        self.assertIsNot(cls, None)
        self.assertIsInstance(create(value, type, **flags), cls)
 
    def test_true(self):
        self.assertTrue(create('y', 'boolean'))
        self.assertTrue(create('yes', 'boolean'))
        self.assertTrue(create('1', 'boolean'))
        self.assertTrue(create('t', 'boolean'))

src/p/o/poky-HEAD/meta/lib/oe/test_types.py   poky(Download)
import unittest
from oe.maketype import create, factory
 
class TestTypes(unittest.TestCase):
    def assertIsInstance(self, obj, cls):
    def assertFactoryCreated(self, value, type, **flags):
        cls = factory(type)
        self.assertIsNot(cls, None)
        self.assertIsInstance(create(value, type, **flags), cls)
 
    def test_true(self):
        self.assertTrue(create('y', 'boolean'))
        self.assertTrue(create('yes', 'boolean'))
        self.assertTrue(create('1', 'boolean'))
        self.assertTrue(create('t', 'boolean'))