From: han-solo Date: Wed, 2 Sep 2020 08:56:37 +0000 (-0400) Subject: Fixed mistake in test for f-string error description (GH-22036) (GH-22059) X-Git-Tag: v3.10.0a1~194 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=749ed85e4446f548e22934931241f644a33d81ce;p=thirdparty%2FPython%2Fcpython.git Fixed mistake in test for f-string error description (GH-22036) (GH-22059) --- diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index dff8c6903218..d2744cdfdca6 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -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() diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index b9bede0d9b80..b53661aa0a46 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -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()