Skip to content

Commit

Permalink
fix(test_cmd): handle GitCommandNotFound in test
Browse files Browse the repository at this point in the history
Related to #248
  • Loading branch information
Byron committed Apr 8, 2015
1 parent 1c2dd54 commit a08733d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions git/test/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from git import (
Git,
GitCommandError,
GitCommandNotFound,
Repo
)
from gitdb.test.lib import with_rw_directory
Expand Down Expand Up @@ -127,11 +128,7 @@ def test_version(self):

def test_cmd_override(self):
prev_cmd = self.git.GIT_PYTHON_GIT_EXECUTABLE
if os.name == 'nt':
exc = GitCommandError
else:
exc = OSError
# end handle windows case
exc = GitCommandNotFound
try:
# set it to something that doens't exist, assure it raises
type(self.git).GIT_PYTHON_GIT_EXECUTABLE = os.path.join(
Expand Down

0 comments on commit a08733d

Please sign in to comment.