tests/basics: Split f-string debug printing to separate file with .exp.
This feature {x=} was introduced in Python 3.8 so needs a separate .exp
file to run on earlier Python versions.
See https://bugs.python.org/issue36817
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -12,17 +12,11 @@ print(f"""no interpolation""")
|
||||
x, y = 1, 2
|
||||
print(f'{x}')
|
||||
print(f'{x:08x}')
|
||||
print(f'{x=}')
|
||||
print(f'{x=:08x}')
|
||||
print(f'a {x} b {y} c')
|
||||
print(f'a {x:08x} b {y} c')
|
||||
print(f'a {x=} b {y} c')
|
||||
print(f'a {x=:08x} b {y} c')
|
||||
|
||||
print(f'a {"hello"} b')
|
||||
print(f'a {f() + g("foo") + h()} b')
|
||||
print(f'a {f() + g("foo") + h()=} b')
|
||||
print(f'a {f() + g("foo") + h()=:08x} b')
|
||||
|
||||
def foo(a, b):
|
||||
return f'{x}{y}{a}{b}'
|
||||
|
||||
Reference in New Issue
Block a user