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():
|
||||
pass
|
||||
|
||||
err_msg = (r"^greenlet.yield_from was supposed to receive "
|
||||
r"only Futures, got .* in task .*$")
|
||||
if hasattr(asyncio.AbstractEventLoop, 'create_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
|
||||
def foo():
|
||||
|
Loading…
Reference in New Issue
Block a user