mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
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:
parent
be7abbb9d9
commit
2ee4128e9b
10 changed files with 18 additions and 32 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue