From a0cb95c5df7a559633c48f5b0f200599c4a62091 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 9 Jan 2015 17:58:53 +0100 Subject: Added test for complex blame revision query. It works as expected by me at least. Related to #71 --- git/test/test_repo.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'git/test/test_repo.py') 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"), -- cgit v1.2.1