summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib
diff options
context:
space:
mode:
authorMatthias Bussonnier <bussonniermatthias@gmail.com>2017-02-16 02:00:32 (GMT)
committerBrett Cannon <brettcannon@users.noreply.github.com>2017-02-16 02:00:32 (GMT)
commit1d4601c2c6952d03fc4dda2b041be9aa8713c0bc (patch)
tree0a2192efa8f0275e65a84ebef34fd060e72089c7 /Lib/test/test_importlib
parent72dccde884d89586b0cafd990675b7e21720a81f (diff)
downloadcpython-1d4601c2c6952d03fc4dda2b041be9aa8713c0bc.zip
cpython-1d4601c2c6952d03fc4dda2b041be9aa8713c0bc.tar.gz
cpython-1d4601c2c6952d03fc4dda2b041be9aa8713c0bc.tar.bz2
bpo-29576: add explicit deprecation for importlib.abc.find_loader() and find_module() (GH-32)
Diffstat (limited to 'Lib/test/test_importlib')
-rw-r--r--Lib/test/test_importlib/test_abc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/test_abc.py b/Lib/test/test_importlib/test_abc.py
index 4c090f3..db36204 100644
--- a/Lib/test/test_importlib/test_abc.py
+++ b/Lib/test/test_importlib/test_abc.py
@@ -163,6 +163,9 @@ class MetaPathFinderDefaultsTests(ABCTestHarness):
# Calling the method is a no-op.
self.ins.invalidate_caches()
+ def test_find_module_warns(self):
+ with self.assertWarns(DeprecationWarning):
+ self.ins.find_module('something', None)
(Frozen_MPFDefaultTests,
Source_MPFDefaultTests
@@ -189,6 +192,9 @@ class PathEntryFinderDefaultsTests(ABCTestHarness):
# Should be a no-op.
self.ins.invalidate_caches()
+ def test_find_loader_warns(self):
+ with self.assertWarns(DeprecationWarning):
+ self.ins.find_loader('something')
(Frozen_PEFDefaultTests,
Source_PEFDefaultTests