mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Fixed mistake in test for f-string error description (GH-22036) (GH-22059)
This commit is contained in:
parent
5b24d1592a
commit
749ed85e44
2 changed files with 2 additions and 2 deletions
|
|
@ -514,7 +514,7 @@ def test_with_a_commas_and_an_underscore_in_format_specifier(self):
|
|||
def test_with_an_underscore_and_a_comma_in_format_specifier(self):
|
||||
error_msg = re.escape("Cannot specify both ',' and '_'.")
|
||||
with self.assertRaisesRegex(ValueError, error_msg):
|
||||
'{:,_}'.format(1)
|
||||
'{:_,}'.format(1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -1217,7 +1217,7 @@ def test_with_a_commas_and_an_underscore_in_format_specifier(self):
|
|||
def test_with_an_underscore_and_a_comma_in_format_specifier(self):
|
||||
error_msg = re.escape("Cannot specify both ',' and '_'.")
|
||||
with self.assertRaisesRegex(ValueError, error_msg):
|
||||
f'{1:,_}'
|
||||
f'{1:_,}'
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue