From 5c17f452b1ed9bef8f1aca66afad5fbbc3bdc76a Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 10 Apr 2025 13:10:58 +0000 Subject: [PATCH] tests: util.custom_task_factory: fix res warn "coro was never awaited" follow-up https://github.com/spesmilo/electrum/commit/70d1e1170ea5fd229bb0ce3e51eda8bc6c52d8dc ``` =============================== warnings summary =============================== tests/test_util.py::TestUtil::test_custom_task_factory /tmp/cirrus-ci-build/tests/test_util.py:504: RuntimeWarning: coroutine 'TestUtil.test_custom_task_factory..foo' was never awaited self.assertEqual(foo().__qualname__, task.get_coro().__qualname__) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. ``` --- tests/test_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index 7c3ba1d04..e2742c495 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -501,7 +501,7 @@ class TestUtil(ElectrumTestCase): # (though what if test framework is doing stuff ~concurrently?) self.assertEqual(4, len(util._running_asyncio_tasks)) for task in util._running_asyncio_tasks: - self.assertEqual(foo().__qualname__, task.get_coro().__qualname__) + self.assertEqual(foo.__qualname__, task.get_coro().__qualname__) # let tasks finish evt.set() # wait a few event loop iterations