From: Georg Brandl Date: Mon, 20 Feb 2012 20:36:28 +0000 (+0100) Subject: Fix "sys.path modified" warning in test_strlit, by not replacing sys.path itself... X-Git-Tag: v3.2.3rc1~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=242631da860fc94eafa86ff50d219cfd9dfded3e;p=thirdparty%2FPython%2Fcpython.git Fix "sys.path modified" warning in test_strlit, by not replacing sys.path itself, only its contents. --- diff --git a/Lib/test/test_strlit.py b/Lib/test/test_strlit.py index 30475a441b99..6bdc6e4e8a24 100644 --- a/Lib/test/test_strlit.py +++ b/Lib/test/test_strlit.py @@ -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):