summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-12-12 16:47:25 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-12-12 16:47:25 +0100
commit04d500524213157fc6f10a31737dc9e55d619056 (patch)
tree799c49fbcbdf1eafbf442e3f65b3776d2390fb1d
parent82c14d6c371cdbd7c847f6c6cd7cf12e3cdf8237 (diff)
downloadaioeventlet-04d500524213157fc6f10a31737dc9e55d619056.tar.gz
Fix run_aiotest.py to support monkey-patching
-rw-r--r--doc/status.rst1
-rw-r--r--run_aiotest.py8
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/status.rst b/doc/status.rst
index 8b1bf6a..5c4302a 100644
--- a/doc/status.rst
+++ b/doc/status.rst
@@ -1,6 +1,7 @@
To do
=====
+* support monkey-patching enabled after loading the aioeventlet module
* register signals in eventlet hub, only needed for pyevent hub?
* port greenio examples to aioeventlet
* write unit tests for, and maybe also examples for:
diff --git a/run_aiotest.py b/run_aiotest.py
index 2b3ce09..b312bb2 100644
--- a/run_aiotest.py
+++ b/run_aiotest.py
@@ -1,8 +1,14 @@
+#import eventlet; eventlet.monkey_patch()
+
import aioeventlet
import aiotest.run
import eventlet
config = aiotest.TestConfig()
-config.new_event_pool_policy = aioeventlet.EventLoopPolicy
+config.asyncio = aioeventlet.asyncio
+config.socket = eventlet.patcher.original('socket')
+config.threading = eventlet.patcher.original('threading')
config.sleep = eventlet.sleep
+config.socketpair = aioeventlet.socketpair
+config.new_event_pool_policy = aioeventlet.EventLoopPolicy
aiotest.run.main(config)