summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/test_build_ext.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/tests/test_build_ext.py')
-rw-r--r--Lib/distutils/tests/test_build_ext.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index 4c09dd8..317ce2b 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -34,7 +34,7 @@ class BuildExtTestCase(support.TempdirManager,
# Note that we're making changes to sys.path
super(BuildExtTestCase, self).setUp()
self.tmp_dir = self.mkdtemp()
- self.sys_path = sys.path[:]
+ self.sys_path = sys.path, sys.path[:]
sys.path.append(self.tmp_dir)
shutil.copy(_get_source_filename(), self.tmp_dir)
if sys.version > "2.6":
@@ -89,7 +89,8 @@ class BuildExtTestCase(support.TempdirManager,
def tearDown(self):
# Get everything back to normal
test_support.unload('xx')
- sys.path = self.sys_path
+ sys.path = self.sys_path[0]
+ sys.path[:] = self.sys_path[1]
if sys.version > "2.6":
import site
site.USER_BASE = self.old_user_base