Tweaked tests to use launcher executable name on OS X.

This commit is contained in:
Vinay Sajip 2012-05-28 16:34:47 +01:00
parent 4469746878
commit 382a7c0180
1 changed files with 5 additions and 1 deletions

View File

@ -29,7 +29,11 @@ class BaseTest(unittest.TestCase):
self.ps3name = 'pysetup3' self.ps3name = 'pysetup3'
self.lib = ('lib', 'python%s' % sys.version[:3]) self.lib = ('lib', 'python%s' % sys.version[:3])
self.include = 'include' 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): def tearDown(self):
shutil.rmtree(self.env_dir) shutil.rmtree(self.env_dir)