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

Function test_get_available_plugin

tests/test_plugin/test_get.py:49–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47
48
49def test_get_available_plugin():
50 old_managers = _managers.copy()
51 _managers.clear()
52 try:
53 _managers.append(PluginManager(["plugins.export", "plugin.require"]))
54
55 # check get available plugins
56 plugin_ids = nonebot.get_available_plugin_names()
57 assert plugin_ids == {"export", "require"}
58 finally:
59 _managers.clear()
60 _managers.extend(old_managers)
61
62
63def test_get_plugin_config():

Callers

nothing calls this directly

Calls 5

PluginManagerClass · 0.90
appendMethod · 0.80
extendMethod · 0.80
copyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected