From 53c53ea4c5440593a527bf3d106b5f7feebeed40 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 6 Dec 2016 19:15:29 +0200 Subject: Issue #27030: Unknown escapes in re.sub() replacement template are allowed again. But they still are deprecated and will be disabled in 3.7. --- Lib/test/test_re.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/test/test_re.py') diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 84131d2b92..4bdaa4b6c6 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -126,7 +126,7 @@ class ReTests(unittest.TestCase): (chr(9)+chr(10)+chr(11)+chr(13)+chr(12)+chr(7)+chr(8))) for c in 'cdehijklmopqsuwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ': with self.subTest(c): - with self.assertRaises(re.error): + with self.assertWarns(DeprecationWarning): self.assertEqual(re.sub('a', '\\' + c, 'a'), '\\' + c) self.assertEqual(re.sub(r'^\s*', 'X', 'test'), 'Xtest') -- cgit v1.2.1