Better tests for fstrings

This commit is contained in:
Dave Halter
2018-03-31 18:38:09 +02:00
parent 43df60ff7d
commit 6b75519145
2 changed files with 22 additions and 0 deletions

View File

@@ -22,3 +22,6 @@ F"{Excepti
Fr'a{Foo.bar' Fr'a{Foo.bar'
#? str() #? str()
Fr'sasdf' Fr'sasdf'
#? 7 str()
Fr'''sasdf''' + ''

View 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'