From 18f8b27cd87043d46b1bfac92eba7806178288e9 2012-05-31 18:54:44
From: Jörgen Stenarson <jorgen.stenarson@kroywen.se>
Date: 2012-05-31 18:54:44
Subject: [PATCH] change to pass whole env + temporary IPYTHONDIR

---

diff --git a/IPython/zmq/tests/test_embed_kernel.py b/IPython/zmq/tests/test_embed_kernel.py
index 5f2ee15..0bf8f62 100644
--- a/IPython/zmq/tests/test_embed_kernel.py
+++ b/IPython/zmq/tests/test_embed_kernel.py
@@ -37,11 +37,8 @@ def setup():
     
     IPYTHONDIR = tempfile.mkdtemp()
 
-    env = dict(IPYTHONDIR=IPYTHONDIR)
-    if 'PYTHONPATH' in os.environ:
-        env['PYTHONPATH'] = os.environ['PYTHONPATH']
-    if sys.platform == 'win32':
-        env["SYSTEMROOT"] = os.environ["SYSTEMROOT"]
+    env = os.environ.copy()
+    env["IPYTHONDIR"] = IPYTHONDIR
 
     save_get_ipython_dir = path.get_ipython_dir
     path.get_ipython_dir = lambda : IPYTHONDIR