Skip to content

Commit 14ad4c0

Browse files
committed
Add more fstring tests
1 parent 1b58f00 commit 14ad4c0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

extra_tests/snippets/syntax_fstring.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
assert fr'x={4*10}\n' == 'x=40\\n'
3232
assert f'{16:0>+#10x}' == '00000+0x10'
3333
assert f"{{{(lambda x: f'hello, {x}')('world}')}" == '{hello, world}'
34+
assert f"""{f'''{f"{f'{foo}'}"}'''}""" == 'bar'
35+
assert f"""{1:{1}{f'n'}}""" == '1'
36+
assert f'{ {1}.pop()}' == '1'
37+
assert f"""{1:{{1}.pop()}{f'n'}}""" == '1'
3438

3539

3640
# base test of self documenting strings

0 commit comments

Comments
 (0)