summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_re.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-06 17:15:29 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-06 17:15:29 (GMT)
commit53c53ea4c5440593a527bf3d106b5f7feebeed40 (patch)
treef02e42b90c60a91a4eabbc08d748704785288dd8 /Lib/test/test_re.py
parentb0f75c520ee882295b0d2884469056ebf0d0568b (diff)
downloadcpython-53c53ea4c5440593a527bf3d106b5f7feebeed40.zip
cpython-53c53ea4c5440593a527bf3d106b5f7feebeed40.tar.gz
cpython-53c53ea4c5440593a527bf3d106b5f7feebeed40.tar.bz2
Issue #27030: Unknown escapes in re.sub() replacement template are allowed
again. But they still are deprecated and will be disabled in 3.7.
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r--Lib/test/test_re.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 84131d2..4bdaa4b 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')