Skip to content

Commit

Permalink
Add missing __eq__ method in PackageGroup for tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <[email protected]>
  • Loading branch information
JeanChristopheMorinPerso committed Jan 1, 2025
1 parent c37fe73 commit d39e1d7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/rez_pip/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ def __repr__(self) -> str:
def __bool__(self) -> bool:
return bool(self.packages)

def __eq__(self, value: typing.Any) -> bool:
"""Needed for tests"""
if not isinstance(value, PackageGroup):
return False

return self.packages == value.packages and self.dists == value.dists

@property
def downloadUrls(self) -> typing.List[str]:
"""List of download URLs"""
Expand Down

0 comments on commit d39e1d7

Please sign in to comment.