diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-07-05 22:09:58 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-07-05 22:27:01 +0200 |
commit | f1a2a4c611bc1f27bd1b63c26847ea74e18caddc (patch) | |
tree | d8ea4c9c347a029fd1318ef2599c29c9e227a0a8 /git/test | |
parent | 6507e4e14337a929d4f3986a90efd8674d963a3f (diff) | |
download | gitpython-f1a2a4c611bc1f27bd1b63c26847ea74e18caddc.tar.gz |
Implemented GIT_PYTHON_GIT_EXECUTABLE including test and docs
Diffstat (limited to 'git/test')
-rw-r--r-- | git/test/test_cmd.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/git/test/test_cmd.py b/git/test/test_cmd.py index b9a0b617..2d38e0a8 100644 --- a/git/test/test_cmd.py +++ b/git/test/test_cmd.py @@ -98,3 +98,13 @@ class TestGit(TestBase): for n in v: assert isinstance(n, int) #END verify number types + + def test_cmd_override(self): + prev_cmd = self.git.GIT_PYTHON_GIT_EXECUTABLE + 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) + finally: + type(self.git).GIT_PYTHON_GIT_EXECUTABLE = prev_cmd + #END undo adjustment |