diff options
author | Yaroslav Halchenko <debian@onerussian.com> | 2017-11-28 11:59:21 -0500 |
---|---|---|
committer | Yaroslav Halchenko <debian@onerussian.com> | 2017-11-28 11:59:21 -0500 |
commit | b4459ca7fd21d549a2342a902cfdeba10c76a022 (patch) | |
tree | f33804003fc074d4c5df176c72050f63348533a9 /git/test/test_git.py | |
parent | 91b9bc4c5ecae9d5c2dff08842e23c32536d4377 (diff) | |
download | gitpython-b4459ca7fd21d549a2342a902cfdeba10c76a022.tar.gz |
BF(WIN): use where instead of which while looking for git
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r-- | git/test/test_git.py | 5 |
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): |