summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Halchenko <debian@onerussian.com>2017-11-28 11:59:21 -0500
committerYaroslav Halchenko <debian@onerussian.com>2017-11-28 11:59:21 -0500
commitb4459ca7fd21d549a2342a902cfdeba10c76a022 (patch)
treef33804003fc074d4c5df176c72050f63348533a9
parent91b9bc4c5ecae9d5c2dff08842e23c32536d4377 (diff)
downloadgitpython-b4459ca7fd21d549a2342a902cfdeba10c76a022.tar.gz
BF(WIN): use where instead of which while looking for git
-rw-r--r--git/test/test_git.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py
index 0a0d7ef7..21ef52da 100644
--- a/git/test/test_git.py
+++ b/git/test/test_git.py
@@ -37,6 +37,8 @@ try:
except ImportError:
import mock
+from git.compat import is_win
+
class TestGit(TestBase):
@@ -177,7 +179,8 @@ class TestGit(TestBase):
self.assertRaises(GitCommandNotFound, refresh, "yada")
# test a good path refresh
- path = os.popen("which git").read().strip()
+ which_cmd = "where" if is_win else "which"
+ path = os.popen("{0} git".format(which_cmd)).read().strip()
refresh(path)
def test_options_are_passed_to_git(self):