Skip to content

Commit 52671f9

Browse files
committed
pythongh-104016: Skip test for deeply neste f-strings on wasi
1 parent 80b7148 commit 52671f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Lib/test/test_fstring.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -561,11 +561,12 @@ def test_mismatched_parens(self):
561561
])
562562
self.assertRaises(SyntaxError, eval, "f'{" + "("*500 + "}'")
563563

564+
@unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
564565
def test_fstring_nested_too_deeply(self):
565566
self.assertAllRaise(SyntaxError,
566567
"f-string: expressions nested too deeply",
567568
['f"{1+2:{1+2:{1+1:{1}}}}"'])
568-
569+
569570
def create_nested_fstring(n):
570571
if n == 0:
571572
return "1+1"
@@ -575,13 +576,13 @@ def create_nested_fstring(n):
575576
self.assertAllRaise(SyntaxError,
576577
"too many nested f-strings",
577578
[create_nested_fstring(160)])
578-
579+
579580
def test_syntax_error_in_nested_fstring(self):
580581
# See gh-104016 for more information on this crash
581582
self.assertAllRaise(SyntaxError,
582583
"invalid syntax",
583584
['f"{1 1:' + ('{f"1:' * 199)])
584-
585+
585586
def test_double_braces(self):
586587
self.assertEqual(f'{{', '{')
587588
self.assertEqual(f'a{{', 'a{')

0 commit comments

Comments
 (0)