]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't replace sys.path in test_site
authorNick Coghlan <ncoghlan@gmail.com>
Sat, 17 Oct 2009 16:19:51 +0000 (16:19 +0000)
committerNick Coghlan <ncoghlan@gmail.com>
Sat, 17 Oct 2009 16:19:51 +0000 (16:19 +0000)
Lib/test/test_site.py

index df264220b703cf0a67429d6f7ffdee850dae6a73..0f87a6f8852c77a586f7dd5fb08057b42371c394 100644 (file)
@@ -41,7 +41,7 @@ class HelperFunctionsTests(unittest.TestCase):
 
     def tearDown(self):
         """Restore sys.path"""
-        sys.path = self.sys_path
+        sys.path[:] = self.sys_path
         site.USER_BASE = self.old_base
         site.USER_SITE = self.old_site
         site.PREFIXES = self.old_prefixes
@@ -248,7 +248,7 @@ class ImportSideEffectTests(unittest.TestCase):
 
     def tearDown(self):
         """Restore sys.path"""
-        sys.path = self.sys_path
+        sys.path[:] = self.sys_path
 
     def test_abs__file__(self):
         # Make sure all imported modules have their __file__ attribute