From 55885e0c4fc40dd2780ff2cde9cda81a43e682c9 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 18 Jul 2011 17:36:28 +0200 Subject: 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 --- git/test/test_repo.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'git/test/test_repo.py') 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"), -- cgit v1.2.1