summaryrefslogtreecommitdiff
path: root/git/test/test_repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-09 17:58:53 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-09 18:00:38 +0100
commita0cb95c5df7a559633c48f5b0f200599c4a62091 (patch)
treedbe9253bc17cf23f0b63de03130350a7c542b9a6 /git/test/test_repo.py
parentc767b5206f1e9c8536110dda4d515ebb9242bbeb (diff)
downloadgitpython-a0cb95c5df7a559633c48f5b0f200599c4a62091.tar.gz
Added test for complex blame revision query.
It works as expected by me at least. Related to #71
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r--git/test/test_repo.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py
index e2342b3c..25acbec9 100644
--- a/git/test/test_repo.py
+++ b/git/test/test_repo.py
@@ -314,6 +314,13 @@ class TestRepo(TestBase):
assert c, "Should have executed at least one blame command"
assert nml, "There should at least be one blame commit that contains multiple lines"
+ @patch.object(Git, '_call_process')
+ def test_blame_complex_revision(self, git):
+ git.return_value = fixture('blame_complex_revision')
+ res = self.rorepo.blame("HEAD~10..HEAD", "README.md")
+ assert len(res) == 1
+ assert len(res[0][1]) == 83, "Unexpected amount of parsed blame lines"
+
def test_untracked_files(self):
base = self.rorepo.working_tree_dir
files = (join_path_native(base, "__test_myfile"),