summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-07-23 12:02:25 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-07-23 12:02:25 (GMT)
commit38d3876bfbeef65ec8ddc81cd88c739e6e8c3699 (patch)
tree7497de178d4be73112bfb94811df34d937c51b67 /Lib/lib2to3/tests
parent70559b5c2026ad7fc76996ef05571ac8e977ef26 (diff)
parent96ec934e755355cfc5af036db8641646b7ddb45e (diff)
downloadcpython-38d3876bfbeef65ec8ddc81cd88c739e6e8c3699.zip
cpython-38d3876bfbeef65ec8ddc81cd88c739e6e8c3699.tar.gz
cpython-38d3876bfbeef65ec8ddc81cd88c739e6e8c3699.tar.bz2
Merge 3.5 (Issue #24619)
Diffstat (limited to 'Lib/lib2to3/tests')
-rw-r--r--Lib/lib2to3/tests/test_parser.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py
index 107b5ab..b533c01 100644
--- a/Lib/lib2to3/tests/test_parser.py
+++ b/Lib/lib2to3/tests/test_parser.py
@@ -67,10 +67,32 @@ class TestAsyncAwait(GrammarTest):
await x
""")
+ self.validate("""async def foo():
+
+ def foo(): pass
+
+ def foo(): pass
+
+ await x
+ """)
+
+ self.validate("""async def foo(): return await a""")
+
+ self.validate("""def foo():
+ def foo(): pass
+ async def foo(): await x
+ """)
+
self.invalid_syntax("await x")
self.invalid_syntax("""def foo():
await x""")
+ self.invalid_syntax("""def foo():
+ def foo(): pass
+ async def foo(): pass
+ await x
+ """)
+
def test_async_var(self):
self.validate("""async = 1""")
self.validate("""await = 1""")