File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/py/reactpy/tests/test_core Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1818STATIC_EVENT_HANDLER = StaticEventHandler ()
1919
2020
21- class StopError (Exception ):
22- """Stop the dispatcher"""
23-
24-
2521def make_send_recv_callbacks (events_to_inject ):
2622 changes = []
2723
@@ -36,7 +32,7 @@ async def send(patch):
3632 changes .append (patch )
3733 sem .release ()
3834 if not events_to_inject :
39- raise StopError ( )
35+ raise Exception ( "Stop running" )
4036
4137 async def recv ():
4238 await sem .acquire ()
@@ -98,7 +94,7 @@ def Counter():
9894async def test_dispatch ():
9995 events , expected_model = make_events_and_expected_model ()
10096 changes , send , recv = make_send_recv_callbacks (events )
101- with pytest .raises (StopError ):
97+ with pytest .raises (ExceptionGroup , match = "Stop running" ):
10298 await asyncio .wait_for (serve_layout (Layout (Counter ()), send , recv ), 1 )
10399 assert_changes_produce_expected_model (changes , expected_model )
104100
You can’t perform that action at this time.
0 commit comments