diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-03-18 19:15:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-18 19:15:52 (GMT) |
commit | a90df5085b51e8bb9de1c04c408bbef42ce6cbc3 (patch) | |
tree | 2ec1005a09eef10be7d52d0659cc6ac1f0c4d84a /Lib/lib2to3/tests/test_parser.py | |
parent | 773573e9ac654d4b5c6682e70360f75864acd80e (diff) | |
download | cpython-a90df5085b51e8bb9de1c04c408bbef42ce6cbc3.zip cpython-a90df5085b51e8bb9de1c04c408bbef42ce6cbc3.tar.gz cpython-a90df5085b51e8bb9de1c04c408bbef42ce6cbc3.tar.bz2 |
Revert "bpo-30406: Make async and await proper keywords (GH-1669)" (GH-6143)
This reverts commit ac317700ce7439e38a8b420218d9a5035bba92ed.
(Reverts only the lib2to3 part.)
(cherry picked from commit f64aae46da292f71f6be750026cd052362e066bc)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Lib/lib2to3/tests/test_parser.py')
-rw-r--r-- | Lib/lib2to3/tests/test_parser.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py index 6813c65..74653ea 100644 --- a/Lib/lib2to3/tests/test_parser.py +++ b/Lib/lib2to3/tests/test_parser.py @@ -181,34 +181,34 @@ class TestAsyncAwait(GrammarTest): async def foo(): await x """) - self.validate("await x") - self.validate("""def foo(): - await x""") + self.invalid_syntax("await x") + self.invalid_syntax("""def foo(): + await x""") - self.validate("""def foo(): + self.invalid_syntax("""def foo(): def foo(): pass async def foo(): pass await x """) def test_async_var(self): - self.invalid_syntax("""async = 1""") - self.invalid_syntax("""await = 1""") - self.invalid_syntax("""def async(): pass""") + self.validate("""async = 1""") + self.validate("""await = 1""") + self.validate("""def async(): pass""") def test_async_with(self): self.validate("""async def foo(): async for a in b: pass""") - self.validate("""def foo(): - async for a in b: pass""") + self.invalid_syntax("""def foo(): + async for a in b: pass""") def test_async_for(self): self.validate("""async def foo(): async with a: pass""") - self.validate("""def foo(): - async with a: pass""") + self.invalid_syntax("""def foo(): + async with a: pass""") class TestRaiseChanges(GrammarTest): |