summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_re.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r--Lib/test/test_re.py12
1 files changed, 3 insertions, 9 deletions
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 @@ class ReTests(unittest.TestCase):
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)+?(.)')