MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / _set_test_contextvar

Function _set_test_contextvar

tests/client/test_client.py:380–385  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

378
379@contextmanager
380def _set_test_contextvar(value: str) -> Iterator[None]:
381 token = _TEST_CONTEXTVAR.set(value)
382 try:
383 yield
384 finally:
385 _TEST_CONTEXTVAR.reset(token)
386
387
388async def test_context_propagation():

Callers 1

test_context_propagationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected