Skip to content

Commit 3d0bdf1

Browse files
committed
Fix asyncio.async/ensure_future warning
1 parent e0272ab commit 3d0bdf1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ Changelog
178178
- The ``forbid_global_loop`` parameter has been removed.
179179
- Support for async and async gen fixtures has been added.
180180
`#45 <https://github.com/pytest-dev/pytest-asyncio/pull/45>`_
181+
- The deprecation warning regarding ``asyncio.async()`` has been fixed.
181182

182183
0.5.0 (2016-09-07)
183184
~~~~~~~~~~~~~~~~~~

pytest_asyncio/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ def pytest_pyfunc_call(pyfuncitem):
152152
for arg in pyfuncitem._fixtureinfo.argnames}
153153

154154
event_loop.run_until_complete(
155-
asyncio.async(pyfuncitem.obj(**testargs), loop=event_loop))
155+
asyncio.ensure_future(
156+
pyfuncitem.obj(**testargs), loop=event_loop))
156157
return True
157158

158159

0 commit comments

Comments
 (0)