diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-22 11:48:57 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-22 11:48:57 (GMT) |
commit | b7666a30933efbbb2e400e6916bba2311340fcd1 (patch) | |
tree | cee7b9199e082b014a9cbcbe749aa86591cad829 /Lib/test/test_coroutines.py | |
parent | 8fb307cd650511ba019c4493275cb6684ad308bc (diff) | |
download | cpython-b7666a30933efbbb2e400e6916bba2311340fcd1.zip cpython-b7666a30933efbbb2e400e6916bba2311340fcd1.tar.gz cpython-b7666a30933efbbb2e400e6916bba2311340fcd1.tar.bz2 |
Issue #24619: More tests; fix nits in compiler.c
Diffstat (limited to 'Lib/test/test_coroutines.py')
-rw-r--r-- | Lib/test/test_coroutines.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py index 3ba2f23..94994e5 100644 --- a/Lib/test/test_coroutines.py +++ b/Lib/test/test_coroutines.py @@ -205,12 +205,14 @@ class AsyncBadSyntaxTest(unittest.TestCase): return lambda a: await """, - """async def foo(a: await b): + """await a()""", + + """async def foo(a=await b): pass """, """def baz(): - async def foo(a: await b): + async def foo(a=await b): pass """, @@ -271,10 +273,9 @@ class AsyncBadSyntaxTest(unittest.TestCase): pass\nawait a """] - ns = {} for code in samples: with self.subTest(code=code), self.assertRaises(SyntaxError): - exec(code, ns, ns) + compile(code, "<test>", "exec") def test_goodsyntax_1(self): # Tests for issue 24619 |