Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r79081:ba4a1979ed5b
Date: 2015-08-20 09:50 +0200
http://bitbucket.org/pypy/pypy/changeset/ba4a1979ed5b/

Log:    Fix if the pypy root dir is not in PYTHONPATH at all

diff --git a/rpython/rlib/rvmprof/test/test_ztranslation.py 
b/rpython/rlib/rvmprof/test/test_ztranslation.py
--- a/rpython/rlib/rvmprof/test/test_ztranslation.py
+++ b/rpython/rlib/rvmprof/test/test_ztranslation.py
@@ -1,4 +1,6 @@
 import time, os, sys
+if __name__ == '__main__':
+    sys.path += ['../../../..']    # for subprocess in test_interpreted
 import py
 from rpython.tool.udir import udir
 from rpython.rlib import rvmprof
@@ -58,8 +60,8 @@
 def test_interpreted():
     # takes forever if the Python process is already big...
     import subprocess
-    env = os.environ.copy()
-    subprocess.check_call([sys.executable, __file__],env=env)
+    subprocess.check_call([sys.executable, os.path.basename(__file__)],
+                          cwd=(os.path.dirname(__file__) or '.'))
 
 def test_compiled():
     fn = compile(main, [], gcpolicy="minimark")
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to