summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git/test/test_index.py4
-rw-r--r--git/test/test_tree.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/git/test/test_index.py b/git/test/test_index.py
index 56c7e795..04638c57 100644
--- a/git/test/test_index.py
+++ b/git/test/test_index.py
@@ -127,7 +127,7 @@ class TestIndex(TestBase):
# test stage
index_merge = IndexFile(self.rorepo, fixture_path("index_merge"))
self.assertEqual(len(index_merge.entries), 106)
- assert len(list(e for e in index_merge.entries.values() if e.stage != 0))
+ assert len([e for e in index_merge.entries.values() if e.stage != 0])
# write the data - it must match the original
tmpfile = tempfile.mktemp()
@@ -190,7 +190,7 @@ class TestIndex(TestBase):
# merge three trees - here we have a merge conflict
three_way_index = IndexFile.from_tree(rw_repo, common_ancestor_sha, cur_sha, other_sha)
- assert len(list(e for e in three_way_index.entries.values() if e.stage != 0))
+ assert len([e for e in three_way_index.entries.values() if e.stage != 0])
# ITERATE BLOBS
merge_required = lambda t: t[0] != 0
diff --git a/git/test/test_tree.py b/git/test/test_tree.py
index 2b2ddb05..3005722f 100644
--- a/git/test/test_tree.py
+++ b/git/test/test_tree.py
@@ -79,7 +79,7 @@ class TestTree(TestBase):
# only choose trees
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, 0)))
+ assert len(trees) == len([i for i in root.traverse() if trees_only(i, 0)])
# test prune
lib_folder = lambda t, d: t.path == "lib"