diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2016-11-06 16:27:50 (GMT) |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-11-06 16:27:50 (GMT) |
| commit | 692b97c8482d36ad96f652ccd324094b60db12d5 (patch) | |
| tree | 3ea762e3dbf1e40ff15a329d9179d31a619148f3 /Lib/test/test_fstring.py | |
| parent | 32d93b2dc8e73af1965ec1986a84fefea17f30e4 (diff) | |
| parent | f66f03bd358c3c481292f2624b8c947f4f77c370 (diff) | |
| download | cpython-692b97c8482d36ad96f652ccd324094b60db12d5.zip cpython-692b97c8482d36ad96f652ccd324094b60db12d5.tar.gz cpython-692b97c8482d36ad96f652ccd324094b60db12d5.tar.bz2 | |
Merge with 3.6
Diffstat (limited to 'Lib/test/test_fstring.py')
| -rw-r--r-- | Lib/test/test_fstring.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 45f768c..086bf67 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -382,11 +382,14 @@ f'{a * x()}'""" ]) def test_no_escapes_for_braces(self): - # \x7b is '{'. Make sure it doesn't start an expression. - self.assertEqual(f'\x7b2}}', '{2}') - self.assertEqual(f'\x7b2', '{2') - self.assertEqual(f'\u007b2', '{2') - self.assertEqual(f'\N{LEFT CURLY BRACKET}2\N{RIGHT CURLY BRACKET}', '{2}') + """ + Only literal curly braces begin an expression. + """ + # \x7b is '{'. + self.assertEqual(f'\x7b1+1}}', '{1+1}') + self.assertEqual(f'\x7b1+1', '{1+1') + self.assertEqual(f'\u007b1+1', '{1+1') + self.assertEqual(f'\N{LEFT CURLY BRACKET}1+1\N{RIGHT CURLY BRACKET}', '{1+1}') def test_newlines_in_expressions(self): self.assertEqual(f'{0}', '0') |
