diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2018-10-19 14:42:06 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-19 14:42:06 (GMT) |
| commit | 6543912c90ffa579dc4c01e811f9609cf92197d3 (patch) | |
| tree | 44f433f463ad6624814d0f3c556501eeefb862b8 /Lib/test/test_fstring.py | |
| parent | 209144831b0a19715bda3bd72b14a3e6192d9cc1 (diff) | |
| download | cpython-6543912c90ffa579dc4c01e811f9609cf92197d3.zip cpython-6543912c90ffa579dc4c01e811f9609cf92197d3.tar.gz cpython-6543912c90ffa579dc4c01e811f9609cf92197d3.tar.bz2 | |
bpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652)
for invalid escape sequences in string and bytes literals.
Diffstat (limited to 'Lib/test/test_fstring.py')
| -rw-r--r-- | Lib/test/test_fstring.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index fec72e0..09b5ae1 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -626,7 +626,7 @@ non-important content self.assertEqual(f'2\x203', '2 3') self.assertEqual(f'\x203', ' 3') - with self.assertWarns(DeprecationWarning): # invalid escape sequence + with self.assertWarns(SyntaxWarning): # invalid escape sequence value = eval(r"f'\{6*7}'") self.assertEqual(value, '\\42') self.assertEqual(f'\\{6*7}', '\\42') |
