File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,11 +109,13 @@ def test_contains_base(self, make_repo):
109109 def test_getitem_base (self , repo ):
110110 pkg1 = repo .create_pkg ("cat/pkg-1" )
111111 pkg2 = repo .create_pkg ("cat/pkg-2" )
112- assert pkg1 == repo ["cat/pkg-1" ]
113- assert pkg1 == repo [Cpv ("cat/pkg-1" )]
114- assert pkg1 == repo [Dep ("=cat/pkg-1" )]
115- assert pkg2 == repo [Dep (">=cat/pkg-2" )]
116- assert [pkg1 , pkg2 ] == repo ["cat/pkg" ]
112+ assert repo ["cat/pkg-1" ] == pkg1
113+ assert repo [Cpv ("cat/pkg-1" )] == pkg1
114+ assert repo [Dep ("=cat/pkg-1" )] == pkg1
115+ assert repo [Dep (">=cat/pkg-2" )] == pkg2
116+ assert repo ["cat/pkg" ] == [pkg1 , pkg2 ]
117+ assert repo ["pkg" ] == [pkg1 , pkg2 ]
118+ assert repo ["*" ] == [pkg1 , pkg2 ]
117119
118120 # nonexistent matches
119121 for obj in ("cat/pkg-3" , Cpv ("cat/pkg-3" ), Dep ("<cat/pkg-1" )):
Original file line number Diff line number Diff line change @@ -165,6 +165,8 @@ def test_getitem(self, make_fake_repo):
165165 s = self .cls (r1 , r2 )
166166 assert s [:] == s
167167 assert s [- 1 ] == r2
168+ assert s ["*" ] == [pkg , pkg1 , pkg2 ]
169+ assert s ["pkg" ] == [pkg , pkg1 , pkg2 ]
168170 assert s ["cat/pkg" ] == [pkg , pkg1 , pkg2 ]
169171 assert s ["cat/pkg-1" ] == [pkg , pkg1 ]
170172 assert s ["=cat/pkg-1::r2" ] == pkg1
You can’t perform that action at this time.
0 commit comments