MCPcopy Create free account
hub / github.com/pallets/quart / __aexit__

Method __aexit__

src/quart/testing/connections.py:80–91  ·  view source on GitHub ↗
(
        self, exc_type: type, exc_value: BaseException, tb: TracebackType
    )

Source from the content-addressed store, hash-verified

78 return self
79
80 async def __aexit__(
81 self, exc_type: type, exc_value: BaseException, tb: TracebackType
82 ) -> None:
83 if exc_type is not None:
84 await self.disconnect()
85 await self._task
86 while not self._receive_queue.empty():
87 data = await self._receive_queue.get()
88 if isinstance(data, bytes):
89 self.response_data.extend(data)
90 elif not isinstance(data, HTTPDisconnectError):
91 raise data
92
93 async def as_response(self) -> Response:
94 while not self._receive_queue.empty():

Callers

nothing calls this directly

Calls 3

disconnectMethod · 0.95
extendMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected