From 57c6cb5100d19a0e0218c77d887c3c239c9ce435 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 6 Apr 2021 08:56:57 -0700 Subject: bpo-42135: Deprecate implementations of find_module() and find_loader() (GH-25169) --- Lib/test/test_importlib/test_api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Lib/test/test_importlib/test_api.py') diff --git a/Lib/test/test_importlib/test_api.py b/Lib/test/test_importlib/test_api.py index 8344fb0e66..763b2add07 100644 --- a/Lib/test/test_importlib/test_api.py +++ b/Lib/test/test_importlib/test_api.py @@ -440,9 +440,9 @@ class StartupTests: with self.subTest(name=name): self.assertTrue(hasattr(module, '__loader__'), '{!r} lacks a __loader__ attribute'.format(name)) - if self.machinery.BuiltinImporter.find_module(name): + if self.machinery.BuiltinImporter.find_spec(name): self.assertIsNot(module.__loader__, None) - elif self.machinery.FrozenImporter.find_module(name): + elif self.machinery.FrozenImporter.find_spec(name): self.assertIsNot(module.__loader__, None) def test_everyone_has___spec__(self): @@ -450,9 +450,9 @@ class StartupTests: if isinstance(module, types.ModuleType): with self.subTest(name=name): self.assertTrue(hasattr(module, '__spec__')) - if self.machinery.BuiltinImporter.find_module(name): + if self.machinery.BuiltinImporter.find_spec(name): self.assertIsNot(module.__spec__, None) - elif self.machinery.FrozenImporter.find_module(name): + elif self.machinery.FrozenImporter.find_spec(name): self.assertIsNot(module.__spec__, None) -- cgit v1.2.1