diff options
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r-- | git/test/test_git.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py index 8087bc45..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( @@ -155,6 +152,10 @@ class TestGit(TestBase): def test_change_to_transform_kwargs_does_not_break_command_options(self): self.git.log(n=1) + def test_insert_after_kwarg_raises(self): + # This isn't a complete add command, which doesn't matter here + self.failUnlessRaises(ValueError, self.git.remote, 'add', insert_kwargs_after='foo') + def test_env_vars_passed_to_git(self): editor = 'non_existant_editor' with mock.patch.dict('os.environ', {'GIT_EDITOR': editor}): |