mirror of
https://github.com/python/cpython.git
synced 2025-12-10 02:50:09 +00:00
Issue 27948: Allow backslashes in the literal string portion of f-strings, but not in the expressions. Also, require expressions to begin and end with literal curly braces.
This commit is contained in:
parent
052828db15
commit
451d0e38fc
9 changed files with 321 additions and 341 deletions
|
|
@ -735,11 +735,11 @@ class FaultHandlerTests(unittest.TestCase):
|
|||
('EXCEPTION_INT_DIVIDE_BY_ZERO', 'int divide by zero'),
|
||||
('EXCEPTION_STACK_OVERFLOW', 'stack overflow'),
|
||||
):
|
||||
self.check_windows_exception("""
|
||||
self.check_windows_exception(f"""
|
||||
import faulthandler
|
||||
faulthandler.enable()
|
||||
faulthandler._raise_exception(faulthandler._{exc})
|
||||
""".format(exc=exc),
|
||||
""",
|
||||
3,
|
||||
name)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue