We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c6c86a commit 6cb0ad2Copy full SHA for 6cb0ad2
Lib/test/test_fstring.py
@@ -11,6 +11,7 @@
11
import types
12
import decimal
13
import unittest
14
+from test.support import use_old_parser
15
16
a_global = 'global variable'
17
@@ -864,7 +865,12 @@ def test_invalid_string_prefixes(self):
864
865
"Bf''",
866
"BF''",]
867
double_quote_cases = [case.replace("'", '"') for case in single_quote_cases]
- self.assertAllRaise(SyntaxError, 'unexpected EOF while parsing',
868
+ error_msg = (
869
+ 'invalid syntax'
870
+ if use_old_parser()
871
+ else 'unexpected EOF while parsing'
872
+ )
873
+ self.assertAllRaise(SyntaxError, error_msg,
874
single_quote_cases + double_quote_cases)
875
876
def test_leading_trailing_spaces(self):
0 commit comments