summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_venv.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_venv.py')
-rw-r--r--Lib/test/test_venv.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 6096b9d..347544a 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -52,10 +52,7 @@ class BaseTest(unittest.TestCase):
self.bindir = 'bin'
self.lib = ('lib', 'python%d.%d' % sys.version_info[:2])
self.include = 'include'
- if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in os.environ:
- executable = os.environ['__PYVENV_LAUNCHER__']
- else:
- executable = sys.executable
+ executable = getattr(sys, '_base_executable', sys.executable)
self.exe = os.path.split(executable)[-1]
def tearDown(self):
@@ -100,11 +97,7 @@ class BasicTest(BaseTest):
else:
self.assertFalse(os.path.exists(p))
data = self.get_text_file_contents('pyvenv.cfg')
- if sys.platform == 'darwin' and ('__PYVENV_LAUNCHER__'
- in os.environ):
- executable = os.environ['__PYVENV_LAUNCHER__']
- else:
- executable = sys.executable
+ executable = getattr(sys, '_base_executable', sys.executable)
path = os.path.dirname(executable)
self.assertIn('home = %s' % path, data)
fn = self.get_env_file(self.bindir, self.exe)