(self)
| 24 | class LazyLoaderFactoryTests(unittest.TestCase): |
| 25 | |
| 26 | def test_init(self): |
| 27 | factory = util.LazyLoader.factory(CollectInit) |
| 28 | # E.g. what importlib.machinery.FileFinder instantiates loaders with |
| 29 | # plus keyword arguments. |
| 30 | lazy_loader = factory('module name', 'module path', kw='kw') |
| 31 | loader = lazy_loader.loader |
| 32 | self.assertEqual(('module name', 'module path'), loader.args) |
| 33 | self.assertEqual({'kw': 'kw'}, loader.kwargs) |
| 34 | |
| 35 | def test_validation(self): |
| 36 | # No exec_module(), no lazy loading. |
nothing calls this directly
no test coverage detected