@@ -148,7 +148,7 @@ def test_add_replaces():
148148
149149
150150def test_parse_raw_diff_many ():
151- # git diff --no-index --raw -z testdata/manyfiles/{left,right}
151+ # git diff --no-index --raw -z --numstat testdata/manyfiles/{left,right}
152152 diff = open ('testdata/unified/manyfiles.txt' ).read ()
153153 mod644 = ['100644' , '100644' , '0000000' , '0000000' ]
154154 assert parse_raw_diff (diff ) == [
@@ -161,20 +161,22 @@ def test_parse_raw_diff_many():
161161 'testdata/manyfiles/left/d.txt' ,
162162 score = 100 ,
163163 dst_path = 'testdata/manyfiles/right/a.txt' ,
164+ num_add = 0 ,
165+ num_delete = 0 ,
164166 ),
165- RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/b.txt' ),
166- RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/c.txt' ),
167- RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/e.txt' ),
168- RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/f.txt' ),
169- RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/g.txt' ),
170- RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/h.txt' ),
171- RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/i.txt' ),
172- RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/j.txt' ),
167+ RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/b.txt' , num_add = 0 , num_delete = 1 ),
168+ RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/c.txt' , num_add = 0 , num_delete = 1 ),
169+ RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/e.txt' , num_add = 0 , num_delete = 1 ),
170+ RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/f.txt' , num_add = 0 , num_delete = 1 ),
171+ RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/g.txt' , num_add = 0 , num_delete = 1 ),
172+ RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/h.txt' , num_add = 0 , num_delete = 1 ),
173+ RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/i.txt' , num_add = 0 , num_delete = 1 ),
174+ RawDiffLine (* mod644 , 'M' , 'testdata/manyfiles/left/j.txt' , num_add = 0 , num_delete = 1 ),
173175 ]
174176
175177
176178def test_parse_raw_diff_rename ():
177- # git diff --no-index --raw -z testdata/rename+change/{left,right}
179+ # git diff --no-index --raw -z --numstat testdata/rename+change/{left,right}
178180 diff = open ('testdata/unified/rename+change.txt' ).read ()
179181 assert parse_raw_diff (diff ) == [
180182 RawDiffLine (
@@ -186,6 +188,8 @@ def test_parse_raw_diff_rename():
186188 'testdata/rename+change/left/huckfinn.txt' ,
187189 score = 90 ,
188190 dst_path = 'testdata/rename+change/right/huckfinn.md' ,
191+ num_add = 2 ,
192+ num_delete = 2 ,
189193 ),
190194 ]
191195
0 commit comments