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