From d7f19201161f4637e89d87b71e5bfdaa31403a9d Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Sun, 21 Jun 2026 01:39:42 +0500 Subject: [PATCH] Restore the coverage. --- tests/test_utils_asyncio.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_utils_asyncio.py b/tests/test_utils_asyncio.py index 5532b4a31..a198d1c09 100644 --- a/tests/test_utils_asyncio.py +++ b/tests/test_utils_asyncio.py @@ -149,3 +149,12 @@ class TestAsyncioLoopingCall: with pytest.raises(TypeError): looping_call.start(0.1) assert not looping_call.running + + @coroutine_test + async def test_looping_function_raises( + self, caplog: pytest.LogCaptureFixture + ) -> None: + looping_call = AsyncioLoopingCall(lambda: 1 / 0) + looping_call.start(0.1) + assert not looping_call.running + assert "Error calling the AsyncioLoopingCall function" in caplog.text