Fix test_task_yield_from_invalid()
The exact error message depends on the version of Trollius and Tulip, if they have the new create_task() function. The check may be removed later when Trollius and Tulip with create_task() will be widely deployed.
This commit is contained in:
parent
c0ec5da9fb
commit
78abe7cc41
@ -149,8 +149,12 @@ class TaskTests(TestCase):
|
|||||||
def bar():
|
def bar():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
err_msg = (r"^greenlet.yield_from was supposed to receive "
|
if hasattr(asyncio.AbstractEventLoop, 'create_task'):
|
||||||
r"only Futures, got .* in task .*$")
|
err_msg = (r"^greenlet.yield_from was supposed to receive "
|
||||||
|
r"only Futures, got .* in task .*$")
|
||||||
|
else:
|
||||||
|
err_msg = (r'^"greenio\.yield_from" was supposed to be called '
|
||||||
|
r'from a "greenio\.task" or a subsequent coroutine$')
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def foo():
|
def foo():
|
||||||
|
Loading…
Reference in New Issue
Block a user