summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2017-10-20 14:41:29 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2017-10-20 14:41:29 (GMT)
commit1e78ed6825701029aa45a68f9e62dd3bb8d4e928 (patch)
treeb3193d19bb7ba1e10b19f99d225930a415300640 /Lib/test
parent9c23b173b823b5e6da01d85c570c7ae2ab07b38b (diff)
downloadcpython-1e78ed6825701029aa45a68f9e62dd3bb8d4e928.zip
cpython-1e78ed6825701029aa45a68f9e62dd3bb8d4e928.tar.gz
cpython-1e78ed6825701029aa45a68f9e62dd3bb8d4e928.tar.bz2
bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (GH-4058) (#4059)
and in codecs.escape_decode() when decode an escaped non-ascii byte. (cherry picked from commit 56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_codecs.py4
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