summaryrefslogtreecommitdiff
path: root/test/git
diff options
context:
space:
mode:
Diffstat (limited to 'test/git')
-rw-r--r--test/git/test_commit.py4
-rw-r--r--test/git/test_index.py4
-rw-r--r--test/git/test_tree.py6
3 files changed, 7 insertions, 7 deletions
diff --git a/test/git/test_commit.py b/test/git/test_commit.py
index e06e35f4..0c05ba50 100644
--- a/test/git/test_commit.py
+++ b/test/git/test_commit.py
@@ -69,10 +69,10 @@ class TestCommit(TestBase):
assert len(list(start.traverse(ignore_self=False, depth=0))) == 1
# prune
- assert start.traverse(branch_first=1, prune=lambda i: i==p0).next() == p1
+ assert start.traverse(branch_first=1, prune=lambda i,d: i==p0).next() == p1
# predicate
- assert start.traverse(branch_first=1, predicate=lambda i: i==p1).next() == p1
+ assert start.traverse(branch_first=1, predicate=lambda i,d: i==p1).next() == p1
@patch_object(Git, '_call_process')
def test_rev_list_bisect_all(self, git):
diff --git a/test/git/test_index.py b/test/git/test_index.py
index 2f4da161..e96aff4c 100644
--- a/test/git/test_index.py
+++ b/test/git/test_index.py
@@ -84,7 +84,7 @@ class TestTree(TestBase):
num_blobs = 0
blist = list()
- for blob in tree.traverse(predicate = lambda e: e.type == "blob", branch_first=False):
+ for blob in tree.traverse(predicate = lambda e,d: e.type == "blob", branch_first=False):
assert (blob.path,0) in index.entries
blist.append(blob)
# END for each blob in tree
@@ -134,7 +134,7 @@ class TestTree(TestBase):
tree = three_way_index.write_tree()
assert isinstance(tree, Tree)
num_blobs = 0
- for blob in tree.traverse(predicate=lambda item: item.type == "blob"):
+ for blob in tree.traverse(predicate=lambda item,d: item.type == "blob"):
assert (blob.path,0) in three_way_index.entries
num_blobs += 1
# END for each blob
diff --git a/test/git/test_tree.py b/test/git/test_tree.py
index 2bfd9922..0bb9647f 100644
--- a/test/git/test_tree.py
+++ b/test/git/test_tree.py
@@ -32,12 +32,12 @@ class TestTree(TestCase):
assert len(list(root)) == len(list(root.traverse(depth=1)))
# only choose trees
- trees_only = lambda i: i.type == "tree"
+ trees_only = lambda i,d: i.type == "tree"
trees = list(root.traverse(predicate = trees_only))
- assert len(trees) == len(list( i for i in root.traverse() if trees_only(i) ))
+ assert len(trees) == len(list( i for i in root.traverse() if trees_only(i,0) ))
# test prune
- lib_folder = lambda t: t.path == "lib"
+ lib_folder = lambda t,d: t.path == "lib"
pruned_trees = list(root.traverse(predicate = trees_only,prune = lib_folder))
assert len(pruned_trees) < len(trees)