diff --git a/test/completion/fstring.py b/test/completion/fstring.py index e6f9b83c..52e81123 100644 --- a/test/completion/fstring.py +++ b/test/completion/fstring.py @@ -22,3 +22,6 @@ F"{Excepti Fr'a{Foo.bar' #? str() Fr'sasdf' + +#? 7 str() +Fr'''sasdf''' + '' diff --git a/test/test_evaluate/test_fstring.py b/test/test_evaluate/test_fstring.py new file mode 100644 index 00000000..2805e44b --- /dev/null +++ b/test/test_evaluate/test_fstring.py @@ -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'