Skip to content

Commit 2dd48bb

Browse files
committed
Fix: not true that thousands separators cannot have an effect for the 'e' presentation type
1 parent 9dbde3b commit 2dd48bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_fractions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,9 +888,10 @@ def test_format_e_presentation_type(self):
888888
(F(22, 7), '11.6e', '3.142857e+00'),
889889
(F(22, 7), '12.6e', '3.142857e+00'),
890890
(F(22, 7), '13.6e', ' 3.142857e+00'),
891-
# Legal to specify a thousands separator, but it'll have no effect
891+
# Thousands separators
892892
(F('1234567.123456'), ',.5e', '1.23457e+06'),
893-
# Same with z flag: legal, but useless
893+
(F('123.123456'), '012_.2e', '0_001.23e+02'),
894+
# z flag is legal, but never makes a different to the output
894895
(F(-1, 7**100), 'z.6e', '-3.091690e-85'),
895896
]
896897
for fraction, spec, expected in testcases:

0 commit comments

Comments
 (0)