1
0

tests: util.custom_task_factory: fix res warn "coro was never awaited"

follow-up 70d1e1170e

```
=============================== 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.<locals>.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.

```
This commit is contained in:
SomberNight
2025-04-10 13:10:58 +00:00
parent ca01830ea5
commit 5c17f452b1

View File

@@ -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