summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
Diffstat (limited to 'git')
-rw-r--r--git/test/test_repo.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py
index e0be2074..9755ea1e 100644
--- a/git/test/test_repo.py
+++ b/git/test/test_repo.py
@@ -299,12 +299,16 @@ class TestRepo(TestBase):
def test_blame_real(self):
c = 0
+ nml = 0 # amount of multi-lines per blame
for item in self.rorepo.head.commit.tree.traverse(
predicate=lambda i, d: i.type == 'blob' and i.path.endswith('.py')):
c += 1
- self.rorepo.blame(self.rorepo.head, item.path)
+
+ for b in self.rorepo.blame(self.rorepo.head, item.path):
+ nml += int(len(b[1]) > 1)
# END for each item to traverse
- assert c
+ assert c, "Should have executed at least one blame command"
+ assert nml, "There should at least be one blame commit that contains multiple lines"
def test_untracked_files(self):
base = self.rorepo.working_tree_dir