Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdd8ee4f

Browse files
committed
Start fixing venv test fixture pip toml bug
This is not yet a usable fix, because venv.create only supportsupgrade_deps on Python 3.9 and higher.
1 parentd40e7d0 commitdd8ee4f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎test/lib/helper.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,13 @@ class VirtualEnvironment:
403403

404404
__slots__= ("_env_dir",)
405405

406-
def__init__(self,env_dir,*,with_pip):
406+
def__init__(self,env_dir,*,need_pip):
407407
ifos.name=="nt":
408408
self._env_dir=osp.realpath(env_dir)
409-
venv.create(self.env_dir,symlinks=False,with_pip=with_pip)
409+
venv.create(self.env_dir,symlinks=False,with_pip=need_pip,upgrade_deps=need_pip)
410410
else:
411411
self._env_dir=env_dir
412-
venv.create(self.env_dir,symlinks=True,with_pip=with_pip)
412+
venv.create(self.env_dir,symlinks=True,with_pip=need_pip,upgrade_deps=need_pip)
413413

414414
@property
415415
defenv_dir(self):

‎test/test_index.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ def test_hook_uses_shell_not_from_cwd(self, rw_dir, case):
10601060
# from a venv may not run when copied outside of it, and a global interpreter
10611061
# won't run when copied to a different location if it was installed from the
10621062
# Microsoft Store. So we make a new venv in rw_dir and use its interpreter.
1063-
venv=VirtualEnvironment(rw_dir,with_pip=False)
1063+
venv=VirtualEnvironment(rw_dir,need_pip=False)
10641064
shutil.copy(venv.python,Path(rw_dir,shell_name))
10651065
shutil.copy(fixture_path("polyglot"),hook_path("polyglot",repo.git_dir))
10661066
payload=Path(rw_dir,"payload.txt")

‎test/test_installation.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_installation(self, rw_dir):
6464

6565
@staticmethod
6666
def_set_up_venv(rw_dir):
67-
venv=VirtualEnvironment(rw_dir,with_pip=True)
67+
venv=VirtualEnvironment(rw_dir,need_pip=True)
6868
os.symlink(
6969
os.path.dirname(os.path.dirname(__file__)),
7070
venv.sources,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp