aboutsummaryrefslogtreecommitdiff
path: root/git/test
diff options
context:
space:
mode:
Diffstat (limited to 'git/test')
-rw-r--r--git/test/lib/helper.py4
-rw-r--r--git/test/performance/lib.py3
-rw-r--r--git/test/test_git.py14
3 files changed, 17 insertions, 4 deletions
diff --git a/git/test/lib/helper.py b/git/test/lib/helper.py
index 871cbe93..1515f2a1 100644
--- a/git/test/lib/helper.py
+++ b/git/test/lib/helper.py
@@ -227,8 +227,8 @@ def with_rw_and_rw_remote_repo(working_tree_ref):
and should be an inetd service that serves tempdir.gettempdir() and all
directories in it.
- The following scetch demonstrates this::
- rorepo ---<bare clone>---> rw_daemon_repo ---<clone>---> rw_repo
+ The following sketch demonstrates this::
+ rorepo ---<bare clone>---> rw_remote_repo ---<clone>---> rw_repo
The test case needs to support the following signature::
def case(self, rw_repo, rw_daemon_repo)
diff --git a/git/test/performance/lib.py b/git/test/performance/lib.py
index 700fee98..7edffa78 100644
--- a/git/test/performance/lib.py
+++ b/git/test/performance/lib.py
@@ -14,11 +14,10 @@ from git.test.lib import (
TestBase
)
from git.util import rmtree
-
import os.path as osp
+#{ Invariants
-#{ Invvariants
k_env_git_repo = "GIT_PYTHON_TEST_GIT_REPO_BASE"
#} END invariants
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')