nonebot-bison/tests/conftest.py
2021-06-16 09:24:11 +08:00

11 lines
333 B
Python

import pytest
import nonebot
@pytest.fixture#(scope="module")
def plugin_module(tmpdir):
nonebot.init(hk_reporter_config_path=str(tmpdir))
nonebot.load_plugins('src/plugins')
plugins = nonebot.get_loaded_plugins()
plugin = list(filter(lambda x: x.name == 'nonebot_hk_reporter', plugins))[0]
return plugin.module