Skip to content

Commit 9ce04f9

Browse files
committed
Suppress warning in test suite
1 parent 82f254b commit 9ce04f9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/server/test_session_tasks.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
from mcp.shared.memory import create_client_server_memory_streams
1313
from mcp.shared.message import SessionMessage
1414

15+
# Mark all tests in this module to ignore memory stream cleanup warnings
16+
# These occur with tg.cancel_scope.cancel() pattern, same as SDK's own
17+
# create_connected_server_and_client_session in src/mcp/shared/memory.py
18+
pytestmark = pytest.mark.filterwarnings(
19+
"ignore:Exception ignored.*MemoryObject.*Stream:pytest.PytestUnraisableExceptionWarning"
20+
)
21+
1522

1623
@pytest.mark.anyio
1724
async def test_get_task_success_with_task_store():

0 commit comments

Comments
 (0)