[Python-checkins] r75468 - python/trunk/Lib/test/test_site.py

nick.coghlan python-checkins at python.org
Sat Oct 17 18:19:52 CEST 2009


Author: nick.coghlan
Date: Sat Oct 17 18:19:51 2009
New Revision: 75468

Log:
Don't replace sys.path in test_site

Modified:
   python/trunk/Lib/test/test_site.py

Modified: python/trunk/Lib/test/test_site.py
==============================================================================
--- python/trunk/Lib/test/test_site.py	(original)
+++ python/trunk/Lib/test/test_site.py	Sat Oct 17 18:19:51 2009
@@ -41,7 +41,7 @@
 
     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 @@
 
     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


More information about the Python-checkins mailing list