MCPcopy
hub / github.com/nonebot/nonebot2 / test_preprocessor

Function test_preprocessor

tests/test_broadcast.py:35–43  ·  view source on GitHub ↗
(
            bot: Bot,
            event: Event,
            state: T_State,
            sub: int = Depends(_dependency),
            default: int = 1,
        )

Source from the content-addressed store, hash-verified

33
34 @event_preprocessor
35 async def test_preprocessor(
36 bot: Bot,
37 event: Event,
38 state: T_State,
39 sub: int = Depends(_dependency),
40 default: int = 1,
41 ):
42 nonlocal runned
43 runned = True
44
45 assert test_preprocessor in {
46 dependent.call for dependent in message._event_preprocessors

Callers

nothing calls this directly

Calls 3

DependsFunction · 0.90
IgnoredExceptionClass · 0.90
sendMethod · 0.45

Tested by

no test coverage detected