@@ -155,6 +155,7 @@ def ckmsg(src, msg):
155155
156156 ckmsg (s , "'continue' not properly in loop" )
157157 ckmsg ("continue\n " , "'continue' not properly in loop" )
158+ ckmsg ("f'{6 0}'" , "invalid syntax. Perhaps you forgot a comma?" )
158159
159160 def testSyntaxErrorMissingParens (self ):
160161 def ckmsg (src , msg , exception = SyntaxError ):
@@ -227,7 +228,7 @@ def testSyntaxErrorOffset(self):
227228 check ('Python = "\u1e54 \xfd \u0163 \u0125 \xf2 \xf1 " +' , 1 , 20 )
228229 check (b'# -*- coding: cp1251 -*-\n Python = "\xcf \xb3 \xf2 \xee \xed " +' ,
229230 2 , 19 , encoding = 'cp1251' )
230- check (b'Python = "\xcf \xb3 \xf2 \xee \xed " +' , 1 , 18 )
231+ check (b'Python = "\xcf \xb3 \xf2 \xee \xed " +' , 1 , 10 )
231232 check ('x = "a' , 1 , 5 )
232233 check ('lambda x: x = 2' , 1 , 1 )
233234 check ('f{a + b + c}' , 1 , 2 )
@@ -293,7 +294,7 @@ def baz():
293294
294295 {
295296 6
296- 0="""''' , 5 , 13 )
297+ 0="""''' , 6 , 15 )
297298
298299 # Errors thrown by symtable.c
299300 check ('x = [(yield i) for i in range(3)]' , 1 , 7 )
0 commit comments