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

Commitc1f6c17

Browse files
committed
Use SystemRoot instead of WINDIR, to fix tox
In most cases they will be the same, but WINDIR may be absent (orhave a different value?) in rare cases.The practical reason it matters in GitPython's tests is that toxautomatically passes SystemRoot through to environments on Windows.
1 parent2b47933 commitc1f6c17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎test/test_git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_it_executes_git_not_from_cwd(self, rw_dir, case):
150150
ifos.name=="nt":
151151
# Copy an actual binary executable that is not git. (On Windows, running
152152
# "hostname" only displays the hostname, it never tries to change it.)
153-
other_exe_path=os.path.join(os.getenv("WINDIR"),"system32","hostname.exe")
153+
other_exe_path=os.path.join(os.environ["SystemRoot"],"system32","hostname.exe")
154154
impostor_path=os.path.join(rw_dir,"git.exe")
155155
shutil.copy(other_exe_path,impostor_path)
156156
else:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp