diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-10-20 14:08:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-20 14:08:15 (GMT) |
commit | 56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f (patch) | |
tree | b9bce18e156f23827247be42659d6fe99cd5c1cd /Lib | |
parent | 525f40d231aba2c004619fc7a5207171ed65b0cb (diff) | |
download | cpython-56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f.zip cpython-56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f.tar.gz cpython-56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f.tar.bz2 |
bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (#4058)
and in codecs.escape_decode() when decode an escaped non-ascii byte.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_codecs.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 1e63ed8..de6868a 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -1203,6 +1203,8 @@ class EscapeDecodeTest(unittest.TestCase): check(br"\8", b"\\8") with self.assertWarns(DeprecationWarning): check(br"\9", b"\\9") + with self.assertWarns(DeprecationWarning): + check(b"\\\xfa", b"\\\xfa") def test_errors(self): decode = codecs.escape_decode @@ -2474,6 +2476,8 @@ class UnicodeEscapeTest(unittest.TestCase): check(br"\8", "\\8") with self.assertWarns(DeprecationWarning): check(br"\9", "\\9") + with self.assertWarns(DeprecationWarning): + check(b"\\\xfa", "\\\xfa") def test_decode_errors(self): decode = codecs.unicode_escape_decode |