mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add more fstring tests
This commit is contained in:
1 parent
1b58f0061e
commit
14ad4c04cf
1 file changed
+4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user