Fix run_aiotest.py to support monkey-patching
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
To do
|
To do
|
||||||
=====
|
=====
|
||||||
|
|
||||||
|
* support monkey-patching enabled after loading the aioeventlet module
|
||||||
* register signals in eventlet hub, only needed for pyevent hub?
|
* register signals in eventlet hub, only needed for pyevent hub?
|
||||||
* port greenio examples to aioeventlet
|
* port greenio examples to aioeventlet
|
||||||
* write unit tests for, and maybe also examples for:
|
* write unit tests for, and maybe also examples for:
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
|
#import eventlet; eventlet.monkey_patch()
|
||||||
|
|
||||||
import aioeventlet
|
import aioeventlet
|
||||||
import aiotest.run
|
import aiotest.run
|
||||||
import eventlet
|
import eventlet
|
||||||
|
|
||||||
config = aiotest.TestConfig()
|
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.sleep = eventlet.sleep
|
||||||
|
config.socketpair = aioeventlet.socketpair
|
||||||
|
config.new_event_pool_policy = aioeventlet.EventLoopPolicy
|
||||||
aiotest.run.main(config)
|
aiotest.run.main(config)
|
||||||
|
|||||||
Reference in New Issue
Block a user