diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 5e42943c38b..aa5378c41a0 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -1,6 +1,5 @@ import sys import os -import tempfile import shutil from io import StringIO @@ -23,7 +22,8 @@ class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") + self.tmp_dir = os.path.join(os.path.dirname(__file__), 'xx') + os.mkdir(self.tmp_dir) self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir)