summaryrefslogtreecommitdiffstats
path: root/Lib/test/test___all__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test___all__.py')
-rw-r--r--Lib/test/test___all__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py
index 200db5c..608ec01 100644
--- a/Lib/test/test___all__.py
+++ b/Lib/test/test___all__.py
@@ -2,7 +2,6 @@ import unittest
from test import support
import os
import sys
-import warnings
class NoAll(RuntimeError):
@@ -16,9 +15,10 @@ class AllTest(unittest.TestCase):
def check_all(self, modname):
names = {}
- with warnings.catch_warnings():
- warnings.filterwarnings("ignore", ".* (module|package)",
- DeprecationWarning)
+ with support.check_warnings(
+ (".* (module|package)", DeprecationWarning),
+ ("", ResourceWarning),
+ quiet=True):
try:
exec("import %s" % modname, names)
except: