File tree Expand file tree Collapse file tree
Open diff view settings
Expand file tree Collapse file tree
Open diff view settings
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def test_index_file_base(self):
127127 # test stage
128128 index_merge = IndexFile (self .rorepo , fixture_path ("index_merge" ))
129129 self .assertEqual (len (index_merge .entries ), 106 )
130- assert len (list ( e for e in index_merge .entries .values () if e .stage != 0 ) )
130+ assert len ([ e for e in index_merge .entries .values () if e .stage != 0 ] )
131131
132132 # write the data - it must match the original
133133 tmpfile = tempfile .mktemp ()
@@ -190,7 +190,7 @@ def test_index_file_from_tree(self, rw_repo):
190190
191191 # merge three trees - here we have a merge conflict
192192 three_way_index = IndexFile .from_tree (rw_repo , common_ancestor_sha , cur_sha , other_sha )
193- assert len (list ( e for e in three_way_index .entries .values () if e .stage != 0 ) )
193+ assert len ([ e for e in three_way_index .entries .values () if e .stage != 0 ] )
194194
195195 # ITERATE BLOBS
196196 merge_required = lambda t : t [0 ] != 0
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ def test_traverse(self):
7979 # only choose trees
8080 trees_only = lambda i , d : i .type == "tree"
8181 trees = list (root .traverse (predicate = trees_only ))
82- assert len (trees ) == len (list ( i for i in root .traverse () if trees_only (i , 0 )) )
82+ assert len (trees ) == len ([ i for i in root .traverse () if trees_only (i , 0 )] )
8383
8484 # test prune
8585 lib_folder = lambda t , d : t .path == "lib"
You can’t perform that action at this time.
0 commit comments