本文整理汇总了Python中invenio.pluginutils.PluginContainer.reload_plugins方法的典型用法代码示例。如果您正苦于以下问题:Python PluginContainer.reload_plugins方法的具体用法?Python PluginContainer.reload_plugins怎么用?Python PluginContainer.reload_plugins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类invenio.pluginutils.PluginContainer
的用法示例。
在下文中一共展示了PluginContainer.reload_plugins方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_plugin_container_module_reloading
# 需要导入模块: from invenio.pluginutils import PluginContainer [as 别名]
# 或者: from invenio.pluginutils.PluginContainer import reload_plugins [as 别名]
def test_plugin_container_module_reloading(self):
"""pluginutils - plugin reloading"""
websubmit_functions = PluginContainer(os.path.join(CFG_PYLIBDIR, 'invenio', 'websubmit_functions', '*.py'))
self.assertNotEqual(websubmit_functions['Is_Referee'].__doc__, "test_reloading")
websubmit_functions['Is_Referee'].__doc__ = "test_reloading"
self.assertEqual(websubmit_functions['Is_Referee'].__doc__, "test_reloading")
websubmit_functions.reload_plugins(reload=True)
self.assertNotEqual(websubmit_functions['Is_Referee'].__doc__, "test_reloading")
示例2: test_plugin_container_module_caching
# 需要导入模块: from invenio.pluginutils import PluginContainer [as 别名]
# 或者: from invenio.pluginutils.PluginContainer import reload_plugins [as 别名]
def test_plugin_container_module_caching(self):
"""pluginutils - plugin caching"""
websubmit_functions = PluginContainer(os.path.join(CFG_PYLIBDIR, "invenio", "websubmit_functions", "*.py"))
self.assertNotEqual(websubmit_functions["Is_Referee"].__doc__, "test_caching")
websubmit_functions["Is_Referee"].__doc__ = "test_caching"
self.assertEqual(websubmit_functions["Is_Referee"].__doc__, "test_caching")
websubmit_functions.reload_plugins()
websubmit_functions_new = PluginContainer(os.path.join(CFG_PYLIBDIR, "invenio", "websubmit_functions", "*.py"))
self.assertEqual(websubmit_functions_new["Is_Referee"].__doc__, "test_caching")