From 14ad4c04cf21029c7f5bb083750d5d2e64882009 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Fri, 19 Aug 2022 05:16:38 +0900 Subject: [PATCH] Add more fstring tests --- extra_tests/snippets/syntax_fstring.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extra_tests/snippets/syntax_fstring.py b/extra_tests/snippets/syntax_fstring.py index c874f196d..bbcfb775e 100644 --- a/extra_tests/snippets/syntax_fstring.py +++ b/extra_tests/snippets/syntax_fstring.py @@ -31,6 +31,10 @@ assert f'{"!:"}' == '!:' assert fr'x={4*10}\n' == 'x=40\\n' assert f'{16:0>+#10x}' == '00000+0x10' assert f"{{{(lambda x: f'hello, {x}')('world}')}" == '{hello, world}' +assert f"""{f'''{f"{f'{foo}'}"}'''}""" == 'bar' +assert f"""{1:{1}{f'n'}}""" == '1' +assert f'{ {1}.pop()}' == '1' +assert f"""{1:{{1}.pop()}{f'n'}}""" == '1' # base test of self documenting strings