From ff27e91cd0e685add681850039ffc3cff35a06df Mon Sep 17 00:00:00 2001 From: yatin Date: Wed, 20 Feb 2019 12:54:41 +0530 Subject: [PATCH] Patch _run_once --- test/util.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/util.py b/test/util.py index 9f56778..8084b9c 100644 --- a/test/util.py +++ b/test/util.py @@ -42,9 +42,13 @@ def run_once(): import asyncio if sys.version_info >= (3, 7): # https://github.com/crossbario/txaio/issues/139 - from _asyncio_test_utils import run_once as _run_once + def _run_once(loop): + loop.call_soon(loop.stop) + loop.run_forever() else: - from asyncio.test_utils import run_once as _run_once + def _run_once(loop): + loop.call_soon(loop.stop) + loop.run_forever() return _run_once(txaio.config.loop or asyncio.get_event_loop()) except ImportError: -- 2.17.1