Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


SSL test_context_streams.py   Sprache: Python

 

"""Tests for the contextvars-carrying memory-stream wrappers."""

import anyio
import pytest

from mcp.shared._context_streams import create_context_streams

pytestmark = pytest.mark.anyio


async def test_sync_close_closes_the_underlying_streams() -> None:
    """The wrappers mirror anyio's memory streams: close() is the sync form of aclose()."""
    send, receive = create_context_streams[str](1)
    await send.send("queued")
    send.close()
    receive.close()
    with pytest.raises(anyio.ClosedResourceError):
        await send.send("after close")
    with pytest.raises(anyio.ClosedResourceError):
        await receive.receive()

Messung
CHZG
849810094

¤ Dauer der Verarbeitung: 0.9 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,296
#Domains=919,356