def test_load_module(): class DummyModule(modules.BaseModule): pass manager = Manager() manager.load_module(DummyModule) assert manager.get_wrapper(DummyModule) is not None manager.unload_module(DummyModule) assert manager.get_wrapper(DummyModule) is None
def test_load_twice(): class DummyModule(modules.BaseModule): pass manager = Manager() manager.load_module(DummyModule) assert manager.get_wrapper(DummyModule) is not None assert len(manager.module_wrappers) == 1 manager.load_module(DummyModule) assert manager.get_wrapper(DummyModule) is not None assert len(manager.module_wrappers) == 1