mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-07 13:24:39 +08:00
f-string syntax in Python 3.8 was enhanced
See e.g. https://twitter.com/raymondh/status/1135253771846471680
This commit is contained in:
@@ -7,7 +7,7 @@ from parso.python.tokenize import tokenize
|
||||
|
||||
@pytest.fixture
|
||||
def grammar():
|
||||
return load_grammar(version='3.6')
|
||||
return load_grammar(version='3.8')
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -31,6 +31,10 @@ def grammar():
|
||||
'{{{1}',
|
||||
'1{{2{{3',
|
||||
'}}',
|
||||
|
||||
# New Python 3.8 syntax f'{a=}'
|
||||
'{a=}',
|
||||
'{a()=}',
|
||||
]
|
||||
)
|
||||
def test_valid(code, grammar):
|
||||
|
||||
Reference in New Issue
Block a user