Merged revisions 79539 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79539 | florent.xicluna | 2010-04-01 01:01:03 +0300 (Thu, 01 Apr 2010) | 2 lines
Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests.
........
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 6e30233..f8a5647 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -1,7 +1,4 @@
-import sys
-sys.path = ['.'] + sys.path
-
-from test.test_support import verbose, run_unittest
+from test.test_support import verbose, run_unittest, import_module
import re
from re import Scanner
import sys, os, traceback
@@ -450,11 +447,8 @@
import cPickle
self.pickle_test(cPickle)
# old pickles expect the _compile() reconstructor in sre module
- import warnings
- with warnings.catch_warnings():
- warnings.filterwarnings("ignore", "The sre module is deprecated",
- DeprecationWarning)
- from sre import _compile
+ import_module("sre", deprecated=True)
+ from sre import _compile
def pickle_test(self, pickle):
oldpat = re.compile('a(?:b|(c|e){1,2}?|d)+?(.)')