Fix run_aiotest.py to support monkey-patching

This commit is contained in:
Victor Stinner
2014-12-12 16:47:25 +01:00
parent 6584d9e71c
commit 9b73d35009
2 changed files with 8 additions and 1 deletions

View File

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

View File

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