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

Function test_message_include

tests/test_adapters/test_message.py:252–267  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

250
251
252def test_message_include():
253 message = FakeMessage(
254 [
255 FakeMessageSegment.text("test"),
256 FakeMessageSegment.image("test2"),
257 FakeMessageSegment.image("test3"),
258 FakeMessageSegment.text("test4"),
259 ]
260 )
261
262 assert message.include("text") == FakeMessage(
263 [
264 FakeMessageSegment.text("test"),
265 FakeMessageSegment.text("test4"),
266 ]
267 )
268
269
270def test_message_exclude():

Callers

nothing calls this directly

Calls 4

FakeMessageClass · 0.90
textMethod · 0.80
imageMethod · 0.80
includeMethod · 0.80

Tested by

no test coverage detected