From f5a99b8660ae8039b79e2bd5b4195cba98d45cdf Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 4 Oct 2010 11:40:23 +0200 Subject: [PATCH] fix PYTHONPATH setup if not previously set --- runtests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- 2.26.2