Ejemplo n.º 1
0
    def test_loaded(self):
        imports.postLoadHooks['spam'] = None

        mod = imports.LazyModule('spam', 'eggs')

        self.assertFalse(imports._isLazy(mod))
Ejemplo n.º 2
0
    def test_lazy(self):
        imports.postLoadHooks['spam'] = []

        mod = imports.LazyModule('spam', 'eggs')

        self.assertTrue(imports._isLazy(mod))
Ejemplo n.º 3
0
    def test_loaded(self):
        imports.postLoadHooks['spam'] = None

        mod = imports.LazyModule('spam', 'eggs')

        self.assertFalse(imports._isLazy(mod))
Ejemplo n.º 4
0
    def test_lazy(self):
        imports.postLoadHooks['spam'] = []

        mod = imports.LazyModule('spam', 'eggs')

        self.assertTrue(imports._isLazy(mod))
    def test_loaded(self):
        imports.postLoadHooks["spam"] = None

        mod = imports.LazyModule("spam", "eggs")

        self.assertFalse(imports._isLazy(mod))
    def test_lazy(self):
        imports.postLoadHooks["spam"] = []

        mod = imports.LazyModule("spam", "eggs")

        self.assertTrue(imports._isLazy(mod))