diff options
author | Yury Selivanov <yury@magic.io> | 2016-09-09 17:36:01 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-09-09 17:36:01 (GMT) |
commit | 52c4e7cc84702750bb75d5423da01d01bcdfdf39 (patch) | |
tree | 01ebfe1725b4169baefa4e76aeaeffcd25153f3b /Lib/lib2to3/tests | |
parent | 93b2dee80e5d72cf12522d773b512097493c09fc (diff) | |
download | cpython-52c4e7cc84702750bb75d5423da01d01bcdfdf39.zip cpython-52c4e7cc84702750bb75d5423da01d01bcdfdf39.tar.gz cpython-52c4e7cc84702750bb75d5423da01d01bcdfdf39.tar.bz2 |
Issue #28008: Implement PEP 530 -- asynchronous comprehensions.
Diffstat (limited to 'Lib/lib2to3/tests')
-rw-r--r-- | Lib/lib2to3/tests/test_parser.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py index b378163..7613f53 100644 --- a/Lib/lib2to3/tests/test_parser.py +++ b/Lib/lib2to3/tests/test_parser.py @@ -134,6 +134,24 @@ class TestAsyncAwait(GrammarTest): """) self.validate("""async def foo(): + [i async for i in b] + """) + + self.validate("""async def foo(): + {i for i in b + async for i in a if await i + for b in i} + """) + + self.validate("""async def foo(): + [await i for i in b if await c] + """) + + self.validate("""async def foo(): + [ i for i in b if c] + """) + + self.validate("""async def foo(): def foo(): pass |