Skip to content

Commit

Permalink
move RaisesGroup import
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed Jun 17, 2024
1 parent 0119442 commit 42f718f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@
except ImportError:
from trio.hazmat import current_task # type: ignore # pylint: disable=ungrouped-imports


# only available on trio>=0.25, we don't use it when testing lower versions
try:
from trio.testing import RaisesGroup
except ImportError:
pass

from trio_websocket import (
connect_websocket,
connect_websocket_url,
Expand Down Expand Up @@ -460,7 +467,6 @@ async def handler(request):
# 2. WebSocketServer.run
# 3. trio.serve_listeners
# 4. WebSocketServer._handle_connection
from trio.testing import RaisesGroup # pylint: disable=import-outside-toplevel
assert RaisesGroup(
RaisesGroup(
RaisesGroup(
Expand Down

0 comments on commit 42f718f

Please sign in to comment.