aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_importlib/test_spec.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_importlib/test_spec.py')
-rw-r--r--Lib/test/test_importlib/test_spec.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_importlib/test_spec.py b/Lib/test/test_importlib/test_spec.py
index 5a16a03de60..20dacec8664 100644
--- a/Lib/test/test_importlib/test_spec.py
+++ b/Lib/test/test_importlib/test_spec.py
@@ -650,8 +650,8 @@ class FactoryTests:
# Need to use a circuitous route to get at importlib.machinery to make
# sure the same class object is used in the isinstance() check as
# would have been used to create the loader.
- self.assertIsInstance(spec.loader,
- self.util.abc.machinery.SourceFileLoader)
+ SourceFileLoader = self.util.spec_from_file_location.__globals__['SourceFileLoader']
+ self.assertIsInstance(spec.loader, SourceFileLoader)
self.assertEqual(spec.loader.name, self.name)
self.assertEqual(spec.loader.path, self.path)
self.assertEqual(spec.origin, self.path)