diff options
Diffstat (limited to 'Lib/test/test_fstring.py')
-rw-r--r-- | Lib/test/test_fstring.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 09b5ae1..fe3804b 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -1004,10 +1004,14 @@ non-important content self.assertEqual('{d[0]}'.format(d=d), 'integer') def test_invalid_expressions(self): - self.assertAllRaise(SyntaxError, 'invalid syntax', - [r"f'{a[4)}'", - r"f'{a(4]}'", - ]) + self.assertAllRaise(SyntaxError, + r"closing parenthesis '\)' does not match " + r"opening parenthesis '\[' \(<fstring>, line 1\)", + [r"f'{a[4)}'"]) + self.assertAllRaise(SyntaxError, + r"closing parenthesis '\]' does not match " + r"opening parenthesis '\(' \(<fstring>, line 1\)", + [r"f'{a(4]}'"]) def test_errors(self): # see issue 26287 |