File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -561,11 +561,12 @@ def test_mismatched_parens(self):
561
561
])
562
562
self .assertRaises (SyntaxError , eval , "f'{" + "(" * 500 + "}'" )
563
563
564
+ @unittest .skipIf (support .is_wasi , "exhausts limited stack on WASI" )
564
565
def test_fstring_nested_too_deeply (self ):
565
566
self .assertAllRaise (SyntaxError ,
566
567
"f-string: expressions nested too deeply" ,
567
568
['f"{1+2:{1+2:{1+1:{1}}}}"' ])
568
-
569
+
569
570
def create_nested_fstring (n ):
570
571
if n == 0 :
571
572
return "1+1"
@@ -575,13 +576,13 @@ def create_nested_fstring(n):
575
576
self .assertAllRaise (SyntaxError ,
576
577
"too many nested f-strings" ,
577
578
[create_nested_fstring (160 )])
578
-
579
+
579
580
def test_syntax_error_in_nested_fstring (self ):
580
581
# See gh-104016 for more information on this crash
581
582
self .assertAllRaise (SyntaxError ,
582
583
"invalid syntax" ,
583
584
['f"{1 1:' + ('{f"1:' * 199 )])
584
-
585
+
585
586
def test_double_braces (self ):
586
587
self .assertEqual (f'{{' , '{' )
587
588
self .assertEqual (f'a{{' , 'a{' )
You can’t perform that action at this time.
0 commit comments