Issue #26182: Raise DeprecationWarning for improper use of async/await keywords

This commit is contained in:
Yury Selivanov 2016-09-15 12:50:23 -04:00
parent 6775231597
commit 8987c9d219
6 changed files with 125 additions and 56 deletions

View file

@ -1345,18 +1345,6 @@ class GrammarTests(unittest.TestCase):
self.assertEqual(m.other, 42)
def test_async_await(self):
async = 1
await = 2
self.assertEqual(async, 1)
def async():
nonlocal await
await = 10
async()
self.assertEqual(await, 10)
self.assertFalse(bool(async.__code__.co_flags & inspect.CO_COROUTINE))
async def test():
def sum():
pass