summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Cross <hodgestar@gmail.com>2010-04-17 23:49:29 +0200
committerSimon Cross <hodgestar@gmail.com>2010-04-17 23:49:29 +0200
commitcf4861e49551e390d958430b57c9cd02d2e4c8bc (patch)
tree63181f31a2a6f412a1f6116e7cfd0fc2d89bdce3
parentc8798a280958adf78062aff3f2bd2558eb0257d1 (diff)
downloadpip-cf4861e49551e390d958430b57c9cd02d2e4c8bc.tar.gz
Add check that after creating scratch venv calling python runs the right python.
-rwxr-xr-xtests/test_pip.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_pip.py b/tests/test_pip.py
index a540e1a1a..6525d7b6c 100755
--- a/tests/test_pip.py
+++ b/tests/test_pip.py
@@ -48,7 +48,14 @@ def reset_env(environ=None):
# put the test-scratch virtualenv's bin dir first on the script path
env.script_path.insert(0, virtualenv_bin_dir(env.base_path))
-
+
+ # test that test-scratch virtualenv creation produced sensible venv python
+ result = env.run('python', '-c', 'import sys; print sys.executable')
+ pythonbin = result.stdout.strip()
+ if pythonbin != os.path.join(virtualenv_bin_dir(env.base_path), "python"):
+ raise RuntimeError("Python sys.executable (%r) isn't the "
+ "test-scratch venv python" % pythonbin)
+
# make sure we have current setuptools to avoid svn incompatibilities
env.run('easy_install', 'setuptools==0.6c11')