Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for global_context (0.06 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_dependency_yield_scope_websockets.py

    from fastapi.testclient import TestClient
    
    global_context: ContextVar[dict[str, Any]] = ContextVar("global_context", default={})  # noqa: B039
    
    
    class Session:
        def __init__(self) -> None:
            self.open = True
    
    
    async def dep_session() -> Any:
        s = Session()
        yield s
        s.open = False
        global_state = global_context.get()
        global_state["session_closed"] = True
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 6K bytes
    - Click Count (0)
Back to Top