Commit 33abc027 authored by Stefan Behnel's avatar Stefan Behnel

fix PYTHONPATH setting for end-to-end tests

parent 4d676ccf
...@@ -662,11 +662,12 @@ class EndToEndTest(unittest.TestCase): ...@@ -662,11 +662,12 @@ class EndToEndTest(unittest.TestCase):
commands = (self.commands commands = (self.commands
.replace("CYTHON", "PYTHON %s" % os.path.join(self.cython_root, 'cython.py')) .replace("CYTHON", "PYTHON %s" % os.path.join(self.cython_root, 'cython.py'))
.replace("PYTHON", sys.executable)) .replace("PYTHON", sys.executable))
commands = """ old_path = os.environ.get('PYTHONPATH')
PYTHONPATH="%s%s$PYTHONPATH" try:
%s os.environ['PYTHONPATH'] = self.cython_root + os.pathsep + (old_path or '')
""" % (self.cython_root, os.pathsep, commands)
self.assertEqual(0, os.system(commands)) self.assertEqual(0, os.system(commands))
finally:
os.environ['PYTHONPATH'] = old_path
# TODO: Support cython_freeze needed here as well. # TODO: Support cython_freeze needed here as well.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment