Skip to content

Commit a08733d

Browse files
committed
fix(test_cmd): handle GitCommandNotFound in test
Related to #248
1 parent 1c2dd54 commit a08733d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎git/test/test_git.py‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
fromgitimport (
2020
Git,
2121
GitCommandError,
22+
GitCommandNotFound,
2223
Repo
2324
)
2425
fromgitdb.test.libimportwith_rw_directory
@@ -127,11 +128,7 @@ def test_version(self):
127128

128129
deftest_cmd_override(self):
129130
prev_cmd=self.git.GIT_PYTHON_GIT_EXECUTABLE
130-
ifos.name=='nt':
131-
exc=GitCommandError
132-
else:
133-
exc=OSError
134-
# end handle windows case
131+
exc=GitCommandNotFound
135132
try:
136133
# set it to something that doens't exist, assure it raises
137134
type(self.git).GIT_PYTHON_GIT_EXECUTABLE=os.path.join(

0 commit comments

Comments
(0)