Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use sys._base_executable instead of sys.executable in test_venv
  • Loading branch information
artemmukhin committed Apr 12, 2023
commit b75f8812b0be39274b3f8328f4913f3884c38c55
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