MCPcopy Index your code
hub / github.com/python/cpython / test_syntax_error_in_nested_fstring

Method test_syntax_error_in_nested_fstring

Lib/test/test_fstring.py:660–664  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

658 raises_syntax_or_memory_error("f'{" + "("*10_000 + "}'")
659
660 def test_syntax_error_in_nested_fstring(self):
661 # See gh-104016 for more information on this crash
662 self.assertAllRaise(SyntaxError,
663 "invalid syntax",
664 ['f"{1 1:' + ('{f"1:' * 199)])
665
666 def test_double_braces(self):
667 self.assertEqual(f'{{', '{')

Callers

nothing calls this directly

Calls 1

assertAllRaiseMethod · 0.95

Tested by

no test coverage detected