Skip to content

Commit dcc9aa9

Browse files
authored
Merge pull request #51 from hynek/master
Fix asyncio.async/ensure_future warning
2 parents e0272ab + 1dc14f8 commit dcc9aa9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.rst

+2
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ 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.
182+
`#51 <https://github.com/pytest-dev/pytest-asyncio/pull/51>`_
181183

182184
0.5.0 (2016-09-07)
183185
~~~~~~~~~~~~~~~~~~

pytest_asyncio/plugin.py

+2-1
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)