Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:16.0:FactoryCandidates
python-promise
python-311.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python-311.patch of Package python-promise
diff --git a/tests/test_awaitable.py b/tests/test_awaitable.py index aad7f2c..a14a181 100644 --- a/tests/test_awaitable.py +++ b/tests/test_awaitable.py @@ -1,18 +1,15 @@ -from asyncio import coroutine from pytest import mark from time import sleep from promise import Promise @mark.asyncio -@coroutine -def test_await(): - yield from Promise.resolve(True) +async def test_await(): + await Promise.resolve(True) @mark.asyncio -@coroutine -def test_await_time(): +async def test_await_time(): def resolve_or_reject(resolve, reject): sleep(.1) resolve(True) @@ -22,11 +19,9 @@ def resolve_or_reject(resolve, reject): @mark.asyncio -@coroutine -def test_promise_coroutine(): - @coroutine - def my_coro(): - yield from Promise.resolve(True) +async def test_promise_coroutine(): + async def my_coro(): + await Promise.resolve(True) promise = Promise.resolve(my_coro()) assert isinstance(promise, Promise)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor