def test_register_a_plugin(): test_plugin = 'test plugin' manager = PluginManager(test_plugin) plugin_info = make_me_a_plugin_info('my') manager.register_a_plugin(TestClass, plugin_info) eq_(plugin_info.cls, TestClass) eq_(manager.registry['my'][0], plugin_info)
def test_get_a_plugin(): test_plugin = 'test plugin' manager = PluginManager(test_plugin) plugin_info = make_me_a_plugin_info('my') plugin_info.cls = TestClass manager.register_a_plugin(TestClass, plugin_info) the_plugin = manager.get_a_plugin('my') assert isinstance(the_plugin, TestClass)
def test_register_a_plugin(): test_plugin = "test plugin" manager = PluginManager(test_plugin) plugin_info = make_me_a_plugin_info("my") manager.register_a_plugin(TestClass, plugin_info) eq_(plugin_info.cls, TestClass) eq_(manager.registry["my"][0], plugin_info) eq_(manager.tag_groups, {"my": "my"})
def test_register_a_plugin(): test_plugin = "test plugin" manager = PluginManager(test_plugin) plugin_info = make_me_a_plugin_info("my") manager.register_a_plugin(TestClass, plugin_info) assert plugin_info.cls == TestClass assert manager.registry["my"][0] == plugin_info assert manager.tag_groups == {"my": "my"}
def register_a_plugin(self, cls): PluginManager.register_a_plugin(self, cls)
def register_a_plugin(self, cls, plugin_info): """ for dynamically loaded plugin """ PluginManager.register_a_plugin(self, cls, plugin_info) _do_additional_registration_for_new_plugins(plugin_info)
def register_a_plugin(self, plugin_cls, plugin_info): """ for dynamically loaded plugin """ PluginManager.register_a_plugin(self, plugin_cls, plugin_info) self._register_a_plugin_info(plugin_info)
def register_a_plugin(self, cls, plugin_info): """ for dynamically loaded plugin """ PluginManager.register_a_plugin(self, cls, plugin_info) _do_additional_registration(plugin_info)
def register_a_plugin(self, plugin_cls, plugin_info): """ for dynamically loaded plugin """ PluginManager.register_a_plugin(self, plugin_cls, plugin_info) self._register_a_plugin_info(plugin_info)