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

Commit b4459ca

Browse files
BF(WIN): use where instead of which while looking for git
1 parent 91b9bc4 commit b4459ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎git/test/test_git.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
except ImportError:
3838
import mock
3939

40+
from git.compat import is_win
41+
4042

4143
class TestGit(TestBase):
4244

@@ -177,7 +179,8 @@ def test_refresh(self):
177179
self.assertRaises(GitCommandNotFound, refresh, "yada")
178180

179181
# test a good path refresh
180-
path = os.popen("which git").read().strip()
182+
which_cmd = "where" if is_win else "which"
183+
path = os.popen("{0} git".format(which_cmd)).read().strip()
181184
refresh(path)
182185

183186
def test_options_are_passed_to_git(self):

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /