From aff395008547bedcb8a3d7a7056096ecf04a288c Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 7 Jan 2017 15:40:55 +0100 Subject: [PATCH] Better async testing. --- test/completion/async_.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/completion/async_.py b/test/completion/async_.py index 02bdc3c2..c6035e37 100644 --- a/test/completion/async_.py +++ b/test/completion/async_.py @@ -2,14 +2,16 @@ Tests for all async use cases. Currently we're not supporting completion of them, but they should at least not -raise errors or return strange results. +raise errors or return extremely strange results. """ - async def x(): - await 3 + argh = await x() + #? + argh + return 2 -#? +#? int() x() a = await x() @@ -17,3 +19,7 @@ a = await x() a +async def x2(): + async with open('asdf') as f: + #? ['readlines'] + f.readlines