diff options
author | Brett Cannon <brett@python.org> | 2021-03-30 15:43:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 15:43:03 (GMT) |
commit | a7ff6df60c05e1b69fca743573b1e118bebf121d (patch) | |
tree | 7dae896ba674245645b5ca46c02cc387a43d35a0 /Lib/test/test_importlib/test_api.py | |
parent | cf35e05f89bb008d6f4553f9875e0fe87fc02406 (diff) | |
download | cpython-a7ff6df60c05e1b69fca743573b1e118bebf121d.zip cpython-a7ff6df60c05e1b69fca743573b1e118bebf121d.tar.gz cpython-a7ff6df60c05e1b69fca743573b1e118bebf121d.tar.bz2 |
bpo-42134: Raise ImportWarning when calling find_module() in the import system (GH-25044)
Diffstat (limited to 'Lib/test/test_importlib/test_api.py')
-rw-r--r-- | Lib/test/test_importlib/test_api.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/test_api.py b/Lib/test/test_importlib/test_api.py index 3f06a10..384ae9c 100644 --- a/Lib/test/test_importlib/test_api.py +++ b/Lib/test/test_importlib/test_api.py @@ -151,6 +151,7 @@ class FindLoaderTests: with test_util.import_state(meta_path=[self.FakeMetaFinder]): with warnings.catch_warnings(): warnings.simplefilter('ignore', DeprecationWarning) + warnings.simplefilter('ignore', ImportWarning) self.assertEqual((name, None), self.init.find_loader(name)) def test_success_path(self): @@ -161,6 +162,7 @@ class FindLoaderTests: with test_util.import_state(meta_path=[self.FakeMetaFinder]): with warnings.catch_warnings(): warnings.simplefilter('ignore', DeprecationWarning) + warnings.simplefilter('ignore', ImportWarning) self.assertEqual((name, path), self.init.find_loader(name, path)) |