diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-05-12 00:43:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-12 00:43:04 (GMT) |
commit | 26f55c29f2316648939ad12a9d3730a2118da2ea (patch) | |
tree | cf021f784f1201ae0e1a9e221ab4a154d5b40b28 /Lib/test/test_fstring.py | |
parent | 5833e94d8615ea18b14e4830ecdb868aec81b378 (diff) | |
download | cpython-26f55c29f2316648939ad12a9d3730a2118da2ea.zip cpython-26f55c29f2316648939ad12a9d3730a2118da2ea.tar.gz cpython-26f55c29f2316648939ad12a9d3730a2118da2ea.tar.bz2 |
bpo-36817: Do not decrement reference for expr_text on fstring = parsing failure (GH-13256)
Diffstat (limited to 'Lib/test/test_fstring.py')
-rw-r--r-- | Lib/test/test_fstring.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index a0fae50..3484fce 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -1148,6 +1148,8 @@ non-important content self.assertEqual(f'{C()=:x}', 'C()=FORMAT-x') self.assertEqual(f'{C()=!r:*^20}', 'C()=********REPR********') + self.assertRaises(SyntaxError, eval, "f'{C=]'") + def test_walrus(self): x = 20 # This isn't an assignment expression, it's 'x', with a format |