summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/frozen/test_finder.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_importlib/frozen/test_finder.py')
-rw-r--r--Lib/test/test_importlib/frozen/test_finder.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_importlib/frozen/test_finder.py b/Lib/test/test_importlib/frozen/test_finder.py
index eb7a4d2..fbc3fc0 100644
--- a/Lib/test/test_importlib/frozen/test_finder.py
+++ b/Lib/test/test_importlib/frozen/test_finder.py
@@ -6,6 +6,8 @@ machinery = util.import_importlib('importlib.machinery')
import unittest
import warnings
+from test.support import import_helper
+
class FindSpecTests(abc.FinderTests):
@@ -13,7 +15,8 @@ class FindSpecTests(abc.FinderTests):
def find(self, name, path=None):
finder = self.machinery.FrozenImporter
- return finder.find_spec(name, path)
+ with import_helper.frozen_modules():
+ return finder.find_spec(name, path)
def test_module(self):
name = '__hello__'
@@ -52,7 +55,8 @@ class FinderTests(abc.FinderTests):
finder = self.machinery.FrozenImporter
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
- return finder.find_module(name, path)
+ with import_helper.frozen_modules():
+ return finder.find_module(name, path)
def test_module(self):
name = '__hello__'