From 56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 20 Oct 2017 17:08:15 +0300 Subject: bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (#4058) and in codecs.escape_decode() when decode an escaped non-ascii byte. --- Lib/test/test_codecs.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/test') diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 1e63ed8d79..de6868a46c 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 -- cgit v1.2.1