fix PYTHONPATH setup if not previously set
authorStefan Behnel <scoder@users.berlios.de>
Mon, 4 Oct 2010 09:40:23 +0000 (11:40 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Mon, 4 Oct 2010 09:40:23 +0000 (11:40 +0200)
runtests.py

index 7ee5650c5bb00049174c8181121aa0b23a3bee2b..8d3f74e02114d99d6d330a487bb84343b838313f 100644 (file)
@@ -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.