Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: support CPython 3.12, update CI jobs #2177

Merged
merged 10 commits into from
Nov 5, 2023
6 changes: 6 additions & 0 deletions tests/asgi/test_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,9 @@ async def on_websocket(self, req, ws):
async with conductor as c:
if accept:
async with c.simulate_ws() as ws:
# Make sure the responder has a chance to reach the raise point
for _ in range(3):
await asyncio.sleep(0)
vytas7 marked this conversation as resolved.
Show resolved Hide resolved
assert ws.closed
assert ws.close_code == exp_code
else:
Expand Down Expand Up @@ -1215,6 +1218,9 @@ async def handle_foobar(req, resp, ex, param): # type: ignore
async with conductor as c:
if place == 'ws_after_accept':
async with c.simulate_ws() as ws:
# Make sure the responder has a chance to reach the raise point
for _ in range(3):
await asyncio.sleep(0)
assert ws.closed
assert ws.close_code == exp_code
else:
Expand Down
Loading