@@ -250,15 +250,15 @@ def test_parsing(self, make_repo, make_git_repo):
250250 commits = list (git .GitRepoCommits (path , 'HEAD' ))
251251 assert len (commits ) == 1
252252 assert commits [0 ].message == ['foo' ]
253- assert commits [0 ].pkgs == []
253+ assert commits [0 ].pkgs == {}
254254 orig_commit = commits [0 ]
255255
256256 # make another commit
257257 git_repo .add ('bar' , msg = 'bar' , create = True )
258258 commits = list (git .GitRepoCommits (path , 'HEAD' ))
259259 assert len (commits ) == 2
260260 assert commits [0 ].message == ['bar' ]
261- assert commits [0 ].pkgs == []
261+ assert commits [0 ].pkgs == {}
262262 assert commits [1 ] == orig_commit
263263 assert len (set (commits )) == 2
264264
@@ -268,7 +268,7 @@ def test_parsing(self, make_repo, make_git_repo):
268268 commits = list (git .GitRepoCommits (path , 'HEAD' ))
269269 assert len (commits ) == 3
270270 assert commits [0 ].message == ['cat/pkg-0' ]
271- assert commits [0 ].pkgs == [ atom_cls ('=cat/pkg-0' )]
271+ assert commits [0 ].pkgs == { 'A' : { atom_cls ('=cat/pkg-0' )}}
272272
273273 # make a multiple pkg commit
274274 repo .create_ebuild ('newcat/newpkg-0' )
@@ -277,19 +277,23 @@ def test_parsing(self, make_repo, make_git_repo):
277277 commits = list (git .GitRepoCommits (path , 'HEAD' ))
278278 assert len (commits ) == 4
279279 assert commits [0 ].message == ['newcat: various updates' ]
280- assert commits [0 ].pkgs == [atom_cls ('=newcat/newpkg-0' ), atom_cls ('=newcat/newpkg-1' )]
280+ assert commits [0 ].pkgs == {
281+ 'A' : {atom_cls ('=newcat/newpkg-0' ), atom_cls ('=newcat/newpkg-1' )}}
281282
282283 # remove the old version
283284 git_repo .remove ('newcat/newpkg/newpkg-0.ebuild' )
284285 commits = list (git .GitRepoCommits (path , 'HEAD' ))
285286 assert len (commits ) == 5
286- assert commits [0 ].pkgs == [ atom_cls ('=newcat/newpkg-0' )]
287+ assert commits [0 ].pkgs == { 'D' : { atom_cls ('=newcat/newpkg-0' )}}
287288
288289 # rename the pkg
289290 git_repo .move ('newcat' , 'newcat2' )
290291 commits = list (git .GitRepoCommits (path , 'HEAD' ))
291292 assert len (commits ) == 6
292- assert commits [0 ].pkgs == [atom_cls ('=newcat/newpkg-1' ), atom_cls ('=newcat2/newpkg-1' )]
293+ assert commits [0 ].pkgs == {
294+ 'A' : {atom_cls ('=newcat2/newpkg-1' )},
295+ 'D' : {atom_cls ('=newcat/newpkg-1' )},
296+ }
293297
294298 # malformed atoms don't show up as pkgs
295299 repo .create_ebuild ('cat/pkg-3' )
@@ -298,7 +302,7 @@ def test_parsing(self, make_repo, make_git_repo):
298302 fake_atom .side_effect = MalformedAtom ('bad atom' )
299303 commits = list (git .GitRepoCommits (path , 'HEAD' ))
300304 assert len (commits ) == 7
301- assert commits [0 ].pkgs == []
305+ assert commits [0 ].pkgs == {}
302306
303307
304308class TestGitRepoPkgs :
0 commit comments