You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, starting from pytest==4.1 generators become deprecated. Of course I can write logic to ignore that behaviour, ignore UserWarnings and unmark tests as skipped, but it would be a hack rather than normal solution.
The way I see is moving to real coroutines with async/await syntax. But it will work only with python3
For what it's worth, my use case for this is to run a battery of tests against a service. So we're not interested in testing multiple versions of python, let alone python 2.
If someone wanted to use this package, and needed tests to work under python 2, a shim like this and sufficiently awful tox.ini would let them work with a python 2 compatible pytest-yield:
ifis_3:
fromasyncioimportcoroutineelse:
coroutine=lambdafunc: coroutine@coroutinedeftest_mytest():
asserta_thing()
yield# from something_awaitable()? Can probably simulate that tooassertanother_thing()
As of pytest 4.1.1 it looks like yield tests are gone, and the machinery supporting them removed. Is there a solution to this?
The text was updated successfully, but these errors were encountered: