File tree 1 file changed +2
-6
lines changed
src/py/reactpy/tests/test_core
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 18
18
STATIC_EVENT_HANDLER = StaticEventHandler ()
19
19
20
20
21
- class StopError (Exception ):
22
- """Stop the dispatcher"""
23
-
24
-
25
21
def make_send_recv_callbacks (events_to_inject ):
26
22
changes = []
27
23
@@ -36,7 +32,7 @@ async def send(patch):
36
32
changes .append (patch )
37
33
sem .release ()
38
34
if not events_to_inject :
39
- raise StopError ( )
35
+ raise Exception ( "Stop running" )
40
36
41
37
async def recv ():
42
38
await sem .acquire ()
@@ -98,7 +94,7 @@ def Counter():
98
94
async def test_dispatch ():
99
95
events , expected_model = make_events_and_expected_model ()
100
96
changes , send , recv = make_send_recv_callbacks (events )
101
- with pytest .raises (StopError ):
97
+ with pytest .raises (ExceptionGroup , match = "Stop running" ):
102
98
await asyncio .wait_for (serve_layout (Layout (Counter ()), send , recv ), 1 )
103
99
assert_changes_produce_expected_model (changes , expected_model )
104
100
You can’t perform that action at this time.
0 commit comments