summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorhan-solo <hanish0019@gmail.com>2020-09-02 08:56:37 (GMT)
committerGitHub <noreply@github.com>2020-09-02 08:56:37 (GMT)
commit749ed85e4446f548e22934931241f644a33d81ce (patch)
tree9bc4bff19f5a1d86fa865286964a120be5a9db77 /Lib/test
parent5b24d1592a990ad7cf81cd1498d255bad41a0b14 (diff)
downloadcpython-749ed85e4446f548e22934931241f644a33d81ce.zip
cpython-749ed85e4446f548e22934931241f644a33d81ce.tar.gz
cpython-749ed85e4446f548e22934931241f644a33d81ce.tar.bz2
Fixed mistake in test for f-string error description (GH-22036) (GH-22059)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_format.py2
-rw-r--r--Lib/test/test_fstring.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py
index dff8c69..d2744cd 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 b9bede0..b53661a 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()