🐛 detect runtime plugin (#1857)

This commit is contained in:
Ju4tCode
2023-03-29 12:22:50 +08:00
committed by GitHub
parent 17c86f7da2
commit 2a2f7b6dce
6 changed files with 163 additions and 85 deletions

View File

@ -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