コード例 #1
0
    def test_loaded(self):
        imports.postLoadHooks['spam'] = None

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

        self.assertFalse(imports._isLazy(mod))
コード例 #2
0
    def test_lazy(self):
        imports.postLoadHooks['spam'] = []

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

        self.assertTrue(imports._isLazy(mod))
コード例 #3
0
    def test_loaded(self):
        imports.postLoadHooks['spam'] = None

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

        self.assertFalse(imports._isLazy(mod))
コード例 #4
0
    def test_lazy(self):
        imports.postLoadHooks['spam'] = []

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

        self.assertTrue(imports._isLazy(mod))
コード例 #5
0
    def test_loaded(self):
        imports.postLoadHooks["spam"] = None

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

        self.assertFalse(imports._isLazy(mod))
コード例 #6
0
    def test_lazy(self):
        imports.postLoadHooks["spam"] = []

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

        self.assertTrue(imports._isLazy(mod))