summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-07-22 11:49:13 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-07-22 11:49:13 (GMT)
commit0811c5d7ba43574d746599c97696e6297382d101 (patch)
tree71d541b4e8f402b4dd1b18615000b41c3e21296c /Lib
parent3f1701a1fb45743a97205375e0e209c1d6bb6587 (diff)
parentb7666a30933efbbb2e400e6916bba2311340fcd1 (diff)
downloadcpython-0811c5d7ba43574d746599c97696e6297382d101.zip
cpython-0811c5d7ba43574d746599c97696e6297382d101.tar.gz
cpython-0811c5d7ba43574d746599c97696e6297382d101.tar.bz2
Merge 3.5 (Issue #24619)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/badsyntax_async2.py2
-rw-r--r--Lib/test/test_coroutines.py9
2 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/badsyntax_async2.py b/Lib/test/badsyntax_async2.py
index 6f6f4f5..fb85e29 100644
--- a/Lib/test/badsyntax_async2.py
+++ b/Lib/test/badsyntax_async2.py
@@ -1,2 +1,2 @@
-async def foo(a:await something()):
+async def foo(a=await something()):
pass
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