summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/builtin/test_loader.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_importlib/builtin/test_loader.py')
-rw-r--r--Lib/test/test_importlib/builtin/test_loader.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/builtin/test_loader.py b/Lib/test/test_importlib/builtin/test_loader.py
index b1349ec..f6b6d97 100644
--- a/Lib/test/test_importlib/builtin/test_loader.py
+++ b/Lib/test/test_importlib/builtin/test_loader.py
@@ -6,6 +6,7 @@ machinery = util.import_importlib('importlib.machinery')
import sys
import types
import unittest
+import warnings
@unittest.skipIf(util.BUILTINS.good_name is None, 'no reasonable builtin module')
class LoaderTests(abc.LoaderTests):
@@ -24,7 +25,9 @@ class LoaderTests(abc.LoaderTests):
self.assertIn(module.__name__, sys.modules)
def load_module(self, name):
- return self.machinery.BuiltinImporter.load_module(name)
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore", DeprecationWarning)
+ return self.machinery.BuiltinImporter.load_module(name)
def test_module(self):
# Common case.