summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-05-10 02:54:52 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-05-10 02:54:52 (GMT)
commitedb628f24132a8f63c94effa09a537e30f3b55f5 (patch)
treed41731673e3bdf8c84d8775be1980b6909adbd23
parentcda73a4b4e17db14bc445a5fa7a777e53fde3bd7 (diff)
downloadcpython-edb628f24132a8f63c94effa09a537e30f3b55f5.zip
cpython-edb628f24132a8f63c94effa09a537e30f3b55f5.tar.gz
cpython-edb628f24132a8f63c94effa09a537e30f3b55f5.tar.bz2
Suppress deprecations for packages as well when using
test.test_support.import_module().
-rw-r--r--Lib/test/test_support.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 9a45fdd..c612c41 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -42,7 +42,8 @@ def import_module(name, deprecated=False):
available."""
with catch_warning(record=False):
if deprecated:
- warnings.filterwarnings("ignore", ".+ module", DeprecationWarning)
+ warnings.filterwarnings("ignore", ".+ (module|package)",
+ DeprecationWarning)
try:
module = __import__(name, level=0)
except ImportError: