File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ async def until(
6767 break
6868 elif (time .time () - started_at ) > timeout : # nocov
6969 msg = f"Expected { description } after { timeout } seconds - last value was { result !r} "
70- raise TimeoutError (msg )
70+ raise asyncio . TimeoutError (msg )
7171
7272 async def until_is (
7373 self ,
Original file line number Diff line number Diff line change @@ -1037,9 +1037,11 @@ def SetStateDuringRender():
10371037 # we expect a second render to be triggered in the background
10381038 await poll (lambda : render_count .current ).until_equals (2 )
10391039
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
10431045
10441046
10451047@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