diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-04-08 12:08:54 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-04-08 12:08:54 +0200 |
commit | a08733d76a8254a20a28f4c3875a173dcf0ad129 (patch) | |
tree | ea85a59827ec95dc8b066435327ab110cb5975ee | |
parent | 1c2dd54358dd526d1d08a8e4a977f041aff74174 (diff) | |
download | gitpython-a08733d76a8254a20a28f4c3875a173dcf0ad129.tar.gz |
fix(test_cmd): handle GitCommandNotFound in test
Related to #248
-rw-r--r-- | git/test/test_git.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py index ef694755..742c842d 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -19,6 +19,7 @@ from git.test.lib import ( from git import ( Git, GitCommandError, + GitCommandNotFound, Repo ) from gitdb.test.lib import with_rw_directory @@ -127,11 +128,7 @@ class TestGit(TestBase): 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( |