diff options
Diffstat (limited to 'Lib/test/test_coroutines.py')
-rw-r--r-- | Lib/test/test_coroutines.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py index 10f7cca..47753e2 100644 --- a/Lib/test/test_coroutines.py +++ b/Lib/test/test_coroutines.py @@ -362,7 +362,22 @@ class AsyncBadSyntaxTest(unittest.TestCase): """def foo(): async def bar(): pass\nawait a - """] + """, + """def foo(): + async for i in arange(2): + pass + """, + """def foo(): + async with resource: + pass + """, + """async with resource: + pass + """, + """async for i in arange(2): + pass + """, + ] for code in samples: with self.subTest(code=code), self.assertRaises(SyntaxError): |