diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-19 16:16:24 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-19 17:02:35 +0200 |
commit | 76ac61a2b4bb10c8434a7d6fc798b115b4b7934d (patch) | |
tree | 763993b8d2c46a425db36e12d941db79866f7de7 /git/test/test_git.py | |
parent | cc77e6b2862733a211c55cf29cc7a83c36c27919 (diff) | |
parent | 9d5d143f72e4d588e3a0abb2ab82fa5a2c35e8aa (diff) | |
download | gitpython-76ac61a2b4bb10c8434a7d6fc798b115b4b7934d.tar.gz |
Merge with latest branch 'exp_git_dir'
Conflicts:
git/repo/base.py
git/repo/fun.py
git/test/test_submodule.py
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r-- | git/test/test_git.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py index 7d713022..f97f8130 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -162,6 +162,20 @@ class TestGit(TestBase): git_command_version = self.git.version() self.assertEquals(git_version, git_command_version) + def test_persistent_options(self): + git_command_version = self.git.version() + # analog to test_options_are_passed_to_git + self.git.set_persistent_git_options(version=True) + git_version = self.git.NoOp() + self.assertEquals(git_version, git_command_version) + # subsequent calls keep this option: + git_version_2 = self.git.NoOp() + self.assertEquals(git_version_2, git_command_version) + + # reset to empty: + self.git.set_persistent_git_options() + self.assertRaises(GitCommandError, self.git.NoOp) + def test_single_char_git_options_are_passed_to_git(self): input_value = 'TestValue' output_value = self.git(c='user.name=%s' % input_value).config('--get', 'user.name') |