diff options
Diffstat (limited to 'Lib/test/test_frozen.py')
-rw-r--r-- | Lib/test/test_frozen.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_frozen.py b/Lib/test/test_frozen.py index 142f17d..52d8f7c 100644 --- a/Lib/test/test_frozen.py +++ b/Lib/test/test_frozen.py @@ -12,7 +12,7 @@ import sys import unittest -from test.support import captured_stdout +from test.support import captured_stdout, import_helper class TestFrozen(unittest.TestCase): @@ -20,8 +20,9 @@ class TestFrozen(unittest.TestCase): name = '__hello__' if name in sys.modules: del sys.modules[name] - with captured_stdout() as out: - import __hello__ + with import_helper.frozen_modules(): + with captured_stdout() as out: + import __hello__ self.assertEqual(out.getvalue(), 'Hello world!\n') |