diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 16:46:53 -0800 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 16:46:53 -0800 |
commit | b1a1742796fce8078f9f1f3d5e3161122fae3b0a (patch) | |
tree | 89c863764481b7c7fbe645be42b16e1d35e92751 /Lib/test/test_re.py | |
parent | 391ed6c73cb1964b57d0b538370a76d03d30511b (diff) | |
parent | cf1f5444eb42a8dc252b295d3863288309996a5d (diff) | |
download | cpython-b1a1742796fce8078f9f1f3d5e3161122fae3b0a.tar.gz |
Merge from 3.6
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r-- | Lib/test/test_re.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index b945cf094e..1d7fb76c38 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -1,12 +1,9 @@ from test.support import verbose, run_unittest, gc_collect, bigmemtest, _2G, \ cpython_only, captured_stdout -import io import locale import re import sre_compile import string -import sys -import traceback import unittest import warnings from re import Scanner @@ -126,7 +123,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.assertWarns(DeprecationWarning): + with self.assertRaises(re.error): self.assertEqual(re.sub('a', '\\' + c, 'a'), '\\' + c) self.assertEqual(re.sub(r'^\s*', 'X', 'test'), 'Xtest') @@ -1506,7 +1503,7 @@ class ReTests(unittest.TestCase): long_overflow = 2**128 self.assertRaises(TypeError, re.finditer, "a", {}) with self.assertRaises(OverflowError): - _sre.compile("abc", 0, [long_overflow], 0, [], []) + _sre.compile("abc", 0, [long_overflow], 0, {}, ()) with self.assertRaises(TypeError): _sre.compile({}, 0, [], 0, [], []) |