Skip to content

Commit a17b995

Browse files
committed
tests/basics/string_fstring.py: Refactor the float part of the test.
This commit refactors `basics/string_fstring.py` to extract the part of the test that requires floating point support into its own file under the `float/` tests directory. The QEMU/PPC64 port currently supports F-Strings but has no floating point support enabled as well. Such a combination was not taken into account and thus the test would fail at the very end on that port. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parent 4de1b21 commit a17b995

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

tests/basics/string_fstring.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,5 @@ def foo(a, b):
8383
print(fr"\r{x}")
8484

8585
# Format specifiers with nested replacement fields
86-
space = 5
87-
prec = 2
88-
print(f"{3.14:{space}.{prec}}")
89-
90-
space_prec = "5.2"
91-
print(f"{3.14:{space_prec}}")
92-
9386
radix = "x"
9487
print(f"{314:{radix}}")

tests/float/string_fstring.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format specifiers with nested replacement fields
2+
space = 5
3+
prec = 2
4+
print(f"{3.14:{space}.{prec}}")
5+
6+
space_prec = "5.2"
7+
print(f"{3.14:{space_prec}}")

0 commit comments

Comments
 (0)