diff options
author | Mariatta Wijaya <mariatta.wijaya@gmail.com> | 2017-02-06 20:18:39 -0800 |
---|---|---|
committer | Mariatta Wijaya <mariatta.wijaya@gmail.com> | 2017-02-06 20:18:39 -0800 |
commit | 731cca110f376cdbaffb536e42d6c9d6da574fa8 (patch) | |
tree | 9cb95caf6f8b933115820bf699725d9cd600d2df /Lib/test/test_re.py | |
parent | da79bcf8ac7ae72218ab023e1ed54390bc1a3a27 (diff) | |
parent | c8102f4d974669f4c5e4ca7bcd73292a1ac5bcbf (diff) | |
download | cpython-731cca110f376cdbaffb536e42d6c9d6da574fa8.tar.gz |
Issue #29371: merge with 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, [], []) |