]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed mistake in test for f-string error description (GH-22036) (GH-22059)
authorhan-solo <hanish0019@gmail.com>
Wed, 2 Sep 2020 08:56:37 +0000 (04:56 -0400)
committerGitHub <noreply@github.com>
Wed, 2 Sep 2020 08:56:37 +0000 (04:56 -0400)
Lib/test/test_format.py
Lib/test/test_fstring.py

index dff8c6903218785b1f3f1acb5f8daa0b26eb198c..d2744cdfdca60e417d5574d406a03e8e732e8df2 100644 (file)
@@ -514,7 +514,7 @@ class FormatTest(unittest.TestCase):
     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()
index b9bede0d9b800ea4e08dfb3c96e8257942f4f9c8..b53661aa0a46fc5ff4d4213775c1344f3d798b24 100644 (file)
@@ -1217,7 +1217,7 @@ non-important content
     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()