File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ async def until(
67
67
break
68
68
elif (time .time () - started_at ) > timeout : # nocov
69
69
msg = f"Expected { description } after { timeout } seconds - last value was { result !r} "
70
- raise TimeoutError (msg )
70
+ raise asyncio . TimeoutError (msg )
71
71
72
72
async def until_is (
73
73
self ,
Original file line number Diff line number Diff line change @@ -1037,9 +1037,11 @@ def SetStateDuringRender():
1037
1037
# we expect a second render to be triggered in the background
1038
1038
await poll (lambda : render_count .current ).until_equals (2 )
1039
1039
1040
- # there should be no more renders that happen
1041
- with pytest .raises (asyncio .TimeoutError ):
1042
- await poll (lambda : render_count .current ).until_equals (3 , timeout = 0.1 )
1040
+ # give an opportunity for a render to happen if it were to.
1041
+ await asyncio .sleep (0.1 )
1042
+
1043
+ # however, we don't expect any more renders
1044
+ assert render_count .current == 2
1043
1045
1044
1046
1045
1047
@pytest .mark .skipif (not REACTPY_DEBUG_MODE .current , reason = "only logs in debug mode" )
You can’t perform that action at this time.
0 commit comments