nonebot2/tests/test_plugin/test_manager.py

13 lines
314 B
Python
Raw Normal View History

2022-05-26 16:35:47 +08:00
import pytest
from nonebug import App
@pytest.mark.asyncio
async def test_load_plugin_name(app: App):
from nonebot.plugin import PluginManager
m = PluginManager(plugins=["plugins.export"])
module1 = m.load_plugin("export")
module2 = m.load_plugin("plugins.export")
assert module1 is module2