Remove test.test_support.guard_warnings_filter.

test.test_support.catch_warning is more full-featured and provides the same
functionality.

Since guard_warnings_filter was added in 2.6 there is no
backwards-compatibility issues.
This commit is contained in:
Brett Cannon 2007-08-14 05:51:06 +00:00
parent be7abbb9d9
commit 2ee4128e9b
10 changed files with 18 additions and 32 deletions

View file

@ -1,7 +1,7 @@
import sys
sys.path = ['.'] + sys.path
from test.test_support import verbose, run_unittest, guard_warnings_filter
from test.test_support import verbose, run_unittest, catch_warning
import re
from re import Scanner
import sys, os, traceback
@ -416,7 +416,7 @@ class ReTests(unittest.TestCase):
self.pickle_test(cPickle)
# old pickles expect the _compile() reconstructor in sre module
import warnings
with guard_warnings_filter():
with catch_warning():
warnings.filterwarnings("ignore", "The sre module is deprecated",
DeprecationWarning)
from sre import _compile