summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tools/test_freeze.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_tools/test_freeze.py')
-rw-r--r--Lib/test/test_tools/test_freeze.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_tools/test_freeze.py b/Lib/test/test_tools/test_freeze.py
index 392a776..386c35a 100644
--- a/Lib/test/test_tools/test_freeze.py
+++ b/Lib/test/test_tools/test_freeze.py
@@ -5,6 +5,7 @@ import textwrap
import unittest
from test import support
+from test.support import os_helper
from . import imports_under_tool, skip_if_missing
skip_if_missing('freeze')
@@ -22,8 +23,8 @@ class TestFreeze(unittest.TestCase):
print('running...')
sys.exit(0)
""")
- outdir, scriptfile, python = helper.prepare(script)
-
- executable = helper.freeze(python, scriptfile, outdir)
- text = helper.run(executable)
+ with os_helper.temp_dir() as outdir:
+ outdir, scriptfile, python = helper.prepare(script, outdir)
+ executable = helper.freeze(python, scriptfile, outdir)
+ text = helper.run(executable)
self.assertEqual(text, 'running...')