diff options
author | Hugo <hugovk@users.noreply.github.com> | 2018-03-18 21:43:41 +0200 |
---|---|---|
committer | Hugo <hugovk@users.noreply.github.com> | 2018-03-18 22:26:31 +0200 |
commit | 87a644184b05e99a4809de378f21424ef6ced06e (patch) | |
tree | 8179e2a309fc9765544d6b95e85485fdfc322ef7 /git/test/test_index.py | |
parent | 34cce402e23a21ba9c3fdf5cd7f27a85e65245c2 (diff) | |
download | gitpython-87a644184b05e99a4809de378f21424ef6ced06e.tar.gz |
Unnecessary generator - rewrite as a list comprehension
Diffstat (limited to 'git/test/test_index.py')
-rw-r--r-- | git/test/test_index.py | 4 |
1 files changed, 2 insertions, 2 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 |