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 704c336 commit 21366c3Copy full SHA for 21366c3
Lib/test/test_fstring.py
@@ -635,13 +635,14 @@ def test_fstring_nested_too_deeply(self):
635
def raises_syntax_or_memory_error(txt):
636
try:
637
eval(txt)
638
- self.fail("No exception raised")
639
except SyntaxError:
640
pass
641
except MemoryError:
642
643
except Exception as ex:
644
self.fail(f"Should raise SyntaxError or MemoryError, not {type(ex)}")
+ else:
645
+ self.fail("No exception raised")
646
647
raises_syntax_or_memory_error('f"{1+2:{1+2:{1+1:{1}}}}"')
648
0 commit comments