mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
Better tests for fstrings
This commit is contained in:
@@ -22,3 +22,6 @@ F"{Excepti
|
|||||||
Fr'a{Foo.bar'
|
Fr'a{Foo.bar'
|
||||||
#? str()
|
#? str()
|
||||||
Fr'sasdf'
|
Fr'sasdf'
|
||||||
|
|
||||||
|
#? 7 str()
|
||||||
|
Fr'''sasdf''' + ''
|
||||||
|
|||||||
19
test/test_evaluate/test_fstring.py
Normal file
19
test/test_evaluate/test_fstring.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import pytest
|
||||||
|
from textwrap import dedent
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def skip_not_supported(environment):
|
||||||
|
if environment.version_info < (3, 6):
|
||||||
|
pytest.skip()
|
||||||
|
|
||||||
|
|
||||||
|
def test_fstring_multiline(Script):
|
||||||
|
code = dedent("""\
|
||||||
|
'' f'''s{
|
||||||
|
str.uppe
|
||||||
|
'''
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
c, = Script(code, line=2, column=9).completions()
|
||||||
|
assert c.name == 'upper'
|
||||||
Reference in New Issue
Block a user