Skip to content

Commit 63fa113

Browse files
Fixed mistake in test for f-string error description (GH-22036) (GH-22059) (GH-22060)
(cherry picked from commit 749ed85) Co-authored-by: han-solo <[email protected]> Co-authored-by: han-solo <[email protected]>
1 parent e2977f6 commit 63fa113

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Lib/test/test_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def test_with_a_commas_and_an_underscore_in_format_specifier(self):
514514
def test_with_an_underscore_and_a_comma_in_format_specifier(self):
515515
error_msg = re.escape("Cannot specify both ',' and '_'.")
516516
with self.assertRaisesRegex(ValueError, error_msg):
517-
'{:,_}'.format(1)
517+
'{:_,}'.format(1)
518518

519519
if __name__ == "__main__":
520520
unittest.main()

Lib/test/test_fstring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ def test_with_a_commas_and_an_underscore_in_format_specifier(self):
12271227
def test_with_an_underscore_and_a_comma_in_format_specifier(self):
12281228
error_msg = re.escape("Cannot specify both ',' and '_'.")
12291229
with self.assertRaisesRegex(ValueError, error_msg):
1230-
f'{1:,_}'
1230+
f'{1:_,}'
12311231

12321232
if __name__ == '__main__':
12331233
unittest.main()

0 commit comments

Comments
 (0)