summaryrefslogtreecommitdiff
path: root/git/test/test_repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-07-18 17:36:28 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-07-18 17:36:28 +0200
commit55885e0c4fc40dd2780ff2cde9cda81a43e682c9 (patch)
tree32a88e8ab218024716dacd6834da7d4b0a460870 /git/test/test_repo.py
parent1f6b8bf020863f499bf956943a5ee56d067407f8 (diff)
downloadgitpython-55885e0c4fc40dd2780ff2cde9cda81a43e682c9.tar.gz
new blame test added
A test which makes the actual git-blame test to be sure it really works in the face of a changing git command implementation
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r--git/test/test_repo.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py
index 00ae37db..21abb86a 100644
--- a/git/test/test_repo.py
+++ b/git/test/test_repo.py
@@ -269,6 +269,15 @@ class TestRepo(TestBase):
assert_true( isinstance( tlist[0], basestring ) )
assert_true( len( tlist ) < sum( len(t) for t in tlist ) ) # test for single-char bug
+ def test_blame_real(self):
+ c = 0
+ for item in self.rorepo.head.commit.tree.traverse(
+ predicate=lambda i, d: i.type == 'blob' and i.path.endswith('.py')):
+ c += 1
+ b = self.rorepo.blame(self.rorepo.head, item.path)
+ #END for each item to traverse
+ assert b
+
def test_untracked_files(self):
base = self.rorepo.working_tree_dir
files = ( join_path_native(base, "__test_myfile"),