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:09:58 +0200 |
commit | 7dcb07947cd71f47b5e2e5f101d289e263506ca9 (patch) | |
tree | 0919e03e08db0edd1e1698a0249c3e15241f6e7a /git/test | |
parent | 1ddf05a78475a194ed1aa082d26b3d27ecc77475 (diff) | |
download | gitpython-7dcb07947cd71f47b5e2e5f101d289e263506ca9.tar.gz |
Implemented GIT_PYTHON_GIT_EXECUTABLE including test and docs
Diffstat (limited to 'git/test')
-rw-r--r-- | git/test/test_git.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py index b9a0b617..2d38e0a8 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.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 |