summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-05-28 15:34:47 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-05-28 15:34:47 (GMT)
commit382a7c0180a885aabd006eea4971e5210ef43b52 (patch)
tree9a1df99c65d40650af5360e65b804a35198f3fcc
parent446974687877fd1f3fb754d64a4740ace1b6a745 (diff)
downloadcpython-382a7c0180a885aabd006eea4971e5210ef43b52.zip
cpython-382a7c0180a885aabd006eea4971e5210ef43b52.tar.gz
cpython-382a7c0180a885aabd006eea4971e5210ef43b52.tar.bz2
Tweaked tests to use launcher executable name on OS X.
-rw-r--r--Lib/test/test_venv.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 08fd1dc..50a8e93 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -29,7 +29,11 @@ class BaseTest(unittest.TestCase):
self.ps3name = 'pysetup3'
self.lib = ('lib', 'python%s' % sys.version[:3])
self.include = 'include'
- self.exe = os.path.split(sys.executable)[-1]
+ if sys.platform == 'darwin' and '__PYTHONV_LAUNCHER__' in env:
+ executable = os.environ['__PYTHONV_LAUNCHER__']
+ else:
+ executable = sys.executable
+ self.exe = os.path.split(executable)[-1]
def tearDown(self):
shutil.rmtree(self.env_dir)