]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed mistake in test for f-string error description (GH-22036) (GH-22059) (GH-22060)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 2 Sep 2020 12:13:39 +0000 (05:13 -0700)
committerGitHub <noreply@github.com>
Wed, 2 Sep 2020 12:13:39 +0000 (08:13 -0400)
(cherry picked from commit 749ed85e4446f548e22934931241f644a33d81ce)

Co-authored-by: han-solo <hanish0019@gmail.com>
Co-authored-by: han-solo <hanish0019@gmail.com>
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 7432ae96c82d610c28bcc451fe39dbe7a309dc8c..2ae815aab18f6dcd5c5730c8901427250bf62f2c 100644 (file)
@@ -1227,7 +1227,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()