async is actually a token that cannot appear in brackets

This commit is contained in:
Dave Halter committed 2020-04-04 23:14:10 +02:00
1 parent bcf76949b6
commit 67ebb6acac
2 files changed
+24

No files matched your search

+22
View File
@@ -1487,3 +1487,25 @@ def test_invalid_function(differ):
''')
differ.initialize(code1)
differ.parse(code2, parsers=1, copies=1, expect_error_leaves=True)
def test_async_func2(differ):
code1 = dedent('''\
async def foo():
return ''
@bla
async def foo():
x
''')
code2 = dedent('''\
async def foo():
return ''
{
@bla
async def foo():
x
y
''')
differ.initialize(code1)
differ.parse(code2, parsers=2, copies=1, expect_error_leaves=True)