Skip to content

Commit

Permalink
Use sys._base_executable instead of sys.executable in test_venv
Browse files Browse the repository at this point in the history
  • Loading branch information
artemmukhin committed Apr 12, 2023
1 parent 67576f5 commit b75f881
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/test/test_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def test_prompt(self):
def test_upgrade_dependencies(self):
builder = venv.EnvBuilder()
bin_path = 'Scripts' if sys.platform == 'win32' else 'bin'
python_exe_realpath = os.path.realpath(sys.executable)
python_exe_realpath = os.path.realpath(sys._base_executable)
python_exe = os.path.split(python_exe_realpath)[1]
with tempfile.TemporaryDirectory() as fake_env_dir:
expect_exe = os.path.normcase(
Expand Down Expand Up @@ -553,7 +553,7 @@ def test_zippath_from_non_installed_posix(self):
self.addCleanup(rmtree, non_installed_dir)
bindir = os.path.join(non_installed_dir, self.bindir)
os.mkdir(bindir)
python_exe_realpath = os.path.realpath(sys.executable)
python_exe_realpath = os.path.realpath(sys._base_executable)
shutil.copy2(python_exe_realpath, bindir)
libdir = os.path.join(non_installed_dir, platlibdir, self.lib[1])
os.makedirs(libdir)
Expand Down

0 comments on commit b75f881

Please sign in to comment.