summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_coroutines.py4
-rw-r--r--Lib/test/test_grammar.py3
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
index 94994e5..14682ca 100644
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -211,6 +211,10 @@ class AsyncBadSyntaxTest(unittest.TestCase):
pass
""",
+ """async def foo(a:await b):
+ pass
+ """,
+
"""def baz():
async def foo(a=await b):
pass
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index ca6b5d0..9b41df1 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -534,7 +534,8 @@ class GrammarTests(unittest.TestCase):
# Not allowed at class scope
check_syntax_error(self, "class foo:yield 1")
check_syntax_error(self, "class foo:yield from ()")
-
+ # Check annotation refleak on SyntaxError
+ check_syntax_error(self, "def g(a:(yield)): pass")
def test_raise(self):
# 'raise' test [',' test]