mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-06 12:06:45 +00:00
🐛 detect runtime plugin (#1857)
This commit is contained in:
@ -79,6 +79,20 @@ async def test_matcher(app: App):
|
||||
ctx.should_finished()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_matcher_destroy(app: App):
|
||||
from plugins.matcher.matcher_process import test_destroy
|
||||
|
||||
async with app.test_matcher(test_destroy) as ctx:
|
||||
assert len(matchers) == 1
|
||||
assert len(matchers[test_destroy.priority]) == 1
|
||||
assert matchers[test_destroy.priority][0] is test_destroy
|
||||
|
||||
test_destroy.destroy()
|
||||
|
||||
assert len(matchers[test_destroy.priority]) == 0
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_type_updater(app: App):
|
||||
from plugins.matcher.matcher_type import test_type_updater, test_custom_updater
|
||||
|
Reference in New Issue
Block a user