mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-29576: add explicit deprecation for importlib.abc.find_loader() and find_module() (GH-32)
This commit is contained in:
parent
72dccde884
commit
1d4601c2c6
5 changed files with 41 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue