Skip to content

Commit

Permalink
clean up test function names
Browse files Browse the repository at this point in the history
  • Loading branch information
lime-green committed Mar 2, 2019
1 parent ecf965d commit 706d4c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pykka/compat/__init__.py
Expand Up @@ -2,7 +2,7 @@

PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
GT_PY34 = sys.version_info[0:2] > (3, 4)
GT_PY34 = sys.version_info > (3, 4)

if PY2:
import Queue as queue # noqa
Expand Down
10 changes: 5 additions & 5 deletions tests/test_future_py3.py
Expand Up @@ -6,7 +6,7 @@
from pykka.compat import await_keyword


def _run_async(coroutine):
def run_async(coroutine):
loop = asyncio.get_event_loop()
f = asyncio.ensure_future(coroutine, loop=loop)
return loop.run_until_complete(f)
Expand All @@ -17,18 +17,18 @@ def _run_async(coroutine):
)
def test_future_supports_await_syntax(future):
@asyncio.coroutine
def _get_value():
def get_value():
return await_keyword(future)

future.set(1)
assert _run_async(_get_value()) == 1
assert run_async(get_value()) == 1


def test_future_supports_yield_from_syntax(future):
@asyncio.coroutine
def _get_value():
def get_value():
val = yield from future
return val

future.set(1)
assert _run_async(_get_value()) == 1
assert run_async(get_value()) == 1

0 comments on commit 706d4c5

Please sign in to comment.