]> granicus.if.org Git - python/commitdiff
Fix "sys.path modified" warning in test_strlit, by not replacing sys.path itself...
authorGeorg Brandl <georg@python.org>
Mon, 20 Feb 2012 20:36:28 +0000 (21:36 +0100)
committerGeorg Brandl <georg@python.org>
Mon, 20 Feb 2012 20:36:28 +0000 (21:36 +0100)
Lib/test/test_strlit.py

index 30475a441b99861af5a331785d2197c0950eedb2..6bdc6e4e8a244a8143b64901f590b732108e1092 100644 (file)
@@ -65,7 +65,7 @@ class TestLiterals(unittest.TestCase):
         sys.path.insert(0, self.tmpdir)
 
     def tearDown(self):
-        sys.path = self.save_path
+        sys.path[:] = self.save_path
         shutil.rmtree(self.tmpdir, ignore_errors=True)
 
     def test_template(self):