diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-06 16:58:40 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-06 16:58:40 +0100 |
commit | 5d0ad081ca0e723ba2a12c876b4cd1574485c726 (patch) | |
tree | 0a608c07c48b74600453644c7e41caa808faec73 /git/test/test_git.py | |
parent | c824bcd73de8a7035f7e55ab3375ee0b6ab28c46 (diff) | |
download | gitpython-5d0ad081ca0e723ba2a12c876b4cd1574485c726.tar.gz |
Improved windows test suite.
Also added code to show how to deal with #147
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r-- | git/test/test_git.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py index 502e6091..f25fa21a 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -121,11 +121,16 @@ 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 try: # set it to something that doens't exist, assure it raises type(self.git).GIT_PYTHON_GIT_EXECUTABLE = os.path.join( "some", "path", "which", "doesn't", "exist", "gitbinary") - self.failUnlessRaises(OSError, self.git.version) + self.failUnlessRaises(exc, self.git.version) finally: type(self.git).GIT_PYTHON_GIT_EXECUTABLE = prev_cmd # END undo adjustment |