MCPcopy
hub / github.com/nonebot/nonebot2 / test_load_plugin_name

Function test_load_plugin_name

tests/test_plugin/test_manager.py:4–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3
4def test_load_plugin_name():
5 m = PluginManager(plugins=["dynamic.manager"])
6 try:
7 _managers.append(m)
8
9 # load by plugin id
10 module1 = m.load_plugin("manager")
11 # load by module name
12 module2 = m.load_plugin("dynamic.manager")
13 assert module1
14 assert module2
15 assert module1 is module2
16 finally:
17 _managers.remove(m)

Callers

nothing calls this directly

Calls 3

load_pluginMethod · 0.95
PluginManagerClass · 0.90
appendMethod · 0.80

Tested by

no test coverage detected