nonebot2/tests/test_plugin/test_manager.py

12 lines
281 B
Python
Raw Normal View History

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