X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/08f1cdd00b4876b2a0545d46981924d5873a3289..149b38d67430f0c580a05c821db767592e7d55e2:/tests/data/python37.py?ds=inline diff --git a/tests/data/python37.py b/tests/data/python37.py index 9781ff6..dab8b40 100644 --- a/tests/data/python37.py +++ b/tests/data/python37.py @@ -1,10 +1,16 @@ #!/usr/bin/env python3.7 + def f(): - return (i*2 async for i in arange(42)) + return (i * 2 async for i in arange(42)) + def g(): - return (something_long * something_long async for something_long in async_generator(with_an_argument)) + return ( + something_long * something_long + async for something_long in async_generator(with_an_argument) + ) + async def func(): if test: @@ -14,6 +20,16 @@ async def func(): self.async_inc, arange(8), batch_size=3 ) ] + + +def awaited_generator_value(n): + return (await awaitable for awaitable in awaitable_list) + + +def make_arange(n): + return (i * 2 for i in range(n) if await wrap(i)) + + # output @@ -39,3 +55,11 @@ async def func(): self.async_inc, arange(8), batch_size=3 ) ] + + +def awaited_generator_value(n): + return (await awaitable for awaitable in awaitable_list) + + +def make_arange(n): + return (i * 2 for i in range(n) if await wrap(i))