Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update test_fstring.py
Co-Authored-By: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-Authored-By: Ken Jin <kenjin@python.org>
  • Loading branch information
3 people committed May 1, 2023
commit eb4b729b35dcae8fe0c46906e181159b65d73f31
4 changes: 4 additions & 0 deletions Lib/test/test_fstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,10 @@ def test_syntax_error_after_debug(self):
"f'{1=}{1;'",
"f'{1=}{1;}'",
])

def test_nested_fstring_max_stack_level(self):
with self.assertRaises(SyntaxError):
compile('f"{1 1:' + ('{f"1:' * 199), "?", "exec")

if __name__ == '__main__':
unittest.main()