From b4459ca7fd21d549a2342a902cfdeba10c76a022 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 28 Nov 2017 11:59:21 -0500 Subject: BF(WIN): use where instead of which while looking for git --- git/test/test_git.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git/test/test_git.py') 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): -- cgit v1.2.1