mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-103718: Correctly cache and restore f-string buffers when needed (GH-103719)
This commit is contained in:
parent
5041c2ba6e
commit
05b3ce7339
3 changed files with 35 additions and 11 deletions
|
@ -1532,5 +1532,10 @@ x = (
|
|||
"f-string: expecting a valid expression after '{'"):
|
||||
compile("f'{**a}'", "?", "exec")
|
||||
|
||||
def test_not_closing_quotes(self):
|
||||
self.assertAllRaise(SyntaxError, "unterminated f-string literal", ['f"', "f'"])
|
||||
self.assertAllRaise(SyntaxError, "unterminated triple-quoted f-string literal",
|
||||
['f"""', "f'''"])
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue