X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/883689366ce0f0e0ddd66d81360c61abfd19b01a..c702588daa9f75855119d0656661ac17934efe35:/tests/data/python37.py diff --git a/tests/data/python37.py b/tests/data/python37.py index ae20ade..dab8b40 100644 --- a/tests/data/python37.py +++ b/tests/data/python37.py @@ -1,7 +1,34 @@ #!/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) + ) + + +async def func(): + if test: + out_batched = [ + i + async for i in aitertools._async_map( + 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 @@ -11,3 +38,28 @@ def f(): def f(): 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) + ) + + +async def func(): + if test: + out_batched = [ + i + async for i in aitertools._async_map( + 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))