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))
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))