Feature: 支持自定义 matchers 存储管理 (#1395)

This commit is contained in:
Ju4tCode
2022-11-21 18:44:55 +08:00
committed by GitHub
parent c783ab5e9b
commit 2922da7b2f
7 changed files with 171 additions and 20 deletions

View File

@ -0,0 +1,11 @@
import pytest
from nonebug import App
@pytest.mark.asyncio
async def test_manager(app: App, load_plugin):
from nonebot.matcher import DEFAULT_PROVIDER_CLASS, matchers
default_provider = matchers.provider
matchers.set_provider(DEFAULT_PROVIDER_CLASS)
assert matchers.provider == default_provider