From: Stefan Behnel Date: Mon, 4 Oct 2010 09:40:23 +0000 (+0200) Subject: fix PYTHONPATH setup if not previously set X-Git-Tag: 0.14.alpha0~302 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f5a99b8660ae8039b79e2bd5b4195cba98d45cdf;p=cython.git fix PYTHONPATH setup if not previously set --- diff --git a/runtests.py b/runtests.py index 7ee5650c..8d3f74e0 100644 --- a/runtests.py +++ b/runtests.py @@ -667,7 +667,10 @@ class EndToEndTest(unittest.TestCase): os.environ['PYTHONPATH'] = self.cython_root + os.pathsep + (old_path or '') self.assertEqual(0, os.system(commands)) finally: - os.environ['PYTHONPATH'] = old_path + if old_path: + os.environ['PYTHONPATH'] = old_path + else: + del os.environ['PYTHONPATH'] # TODO: Support cython_freeze needed here as well.