Skip to content

Commit b75f881

Browse files
committed
Use sys._base_executable instead of sys.executable in test_venv
1 parent 67576f5 commit b75f881

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_venv.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def test_prompt(self):
208208
def test_upgrade_dependencies(self):
209209
builder = venv.EnvBuilder()
210210
bin_path = 'Scripts' if sys.platform == 'win32' else 'bin'
211-
python_exe_realpath = os.path.realpath(sys.executable)
211+
python_exe_realpath = os.path.realpath(sys._base_executable)
212212
python_exe = os.path.split(python_exe_realpath)[1]
213213
with tempfile.TemporaryDirectory() as fake_env_dir:
214214
expect_exe = os.path.normcase(
@@ -553,7 +553,7 @@ def test_zippath_from_non_installed_posix(self):
553553
self.addCleanup(rmtree, non_installed_dir)
554554
bindir = os.path.join(non_installed_dir, self.bindir)
555555
os.mkdir(bindir)
556-
python_exe_realpath = os.path.realpath(sys.executable)
556+
python_exe_realpath = os.path.realpath(sys._base_executable)
557557
shutil.copy2(python_exe_realpath, bindir)
558558
libdir = os.path.join(non_installed_dir, platlibdir, self.lib[1])
559559
os.makedirs(libdir)

0 commit comments

Comments
 (0)