Permalink
Browse files

Ensure pythonpath is applied to test env only if present.

  • Loading branch information...
1 parent b3a081f commit 681e926dcab4959b8aff3137de0a4ac6327a90b3 @fperez committed May 26, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 IPython/zmq/tests/test_embed_kernel.py
@@ -36,8 +36,9 @@ def setup():
global save_get_ipython_dir
IPYTHONDIR = tempfile.mkdtemp()
- env = dict(IPYTHONDIR=IPYTHONDIR,
- PYTHONPATH=os.environ['PYTHONPATH'])
+ env = dict(IPYTHONDIR=IPYTHONDIR)
+ if 'PYTHONPATH' in os.environ:
+ env['PYTHONPATH'] = os.environ['PYTHONPATH']
save_get_ipython_dir = path.get_ipython_dir
path.get_ipython_dir = lambda : IPYTHONDIR

0 comments on commit 681e926

Please sign in to comment.