diff --git a/tests/test_core/test_layout.py b/tests/test_core/test_layout.py index 5dde99e18..0e72a958c 100644 --- a/tests/test_core/test_layout.py +++ b/tests/test_core/test_layout.py @@ -234,11 +234,11 @@ def AnElement(): await layout.render() try: - asyncio.wait_for( - [layout.render()], + await asyncio.wait_for( + layout.render(), timeout=0.1, # this should have been plenty of time ) - except asyncio.CancelledError: + except asyncio.TimeoutError: pass # the render should still be rendering since we only update once assert run_count.current == 2