# Path: hotness/domain/package.py
# class Package:
#     """
#     Internal representation of package object.
# 
#     Attributes:
#         name (str): Name of the package
#         version (str): Latest version of the package
#         distro (str): Distribution assigned
#     """
# 
#     def __init__(self, name: str, version: str, distro: str) -> None:
#         """
#         Class constructor
#         """
#         self.name = name
#         self.version = version
#         self.distro = distro
# 
#     def to_dict(self) -> dict:
#         """
#         Convert object to dictionary.
# 
#         Return:
#             Dictionary created from package object.
#         """
#         return {"name": self.name, "version": self.version, "distro": self.distro}
# 
#     @classmethod
#     def from_dict(cls, package_dict: dict) -> object:
#         """
#         Convert dictionary to object.
# 
#         Params:
#             package_dict: Dictionary to create package from.
# 
#         Return:
#             Package object.
#         """
#         package = Package(
#             name=package_dict["name"],
#             version=package_dict["version"],
#             distro=package_dict["distro"],
#         )
#         return package
# 
#     def __eq__(self, other: object) -> bool:
#         """
#         Compare method for package object.
# 
#         Params:
#             other: object to compare with
# 
#         Return:
#             Compare result.
#         """
#         return self.to_dict() == other.to_dict()  # type: ignore


from hotness.domain.package import Package
        Test object creation from dict.
        """
        package_dict = {"name": "name", "version": "1.0.0-rc1", "distro": "Fedora"}

        package = Package.from_dict(package_dict)

        assert package.name == "name"
        assert package.version == "1.0.0-rc1"
        assert package.distro == "Fedora"


class TestPackageEq:
    """
    Test class for `hotness.domain.package.__eq__` method.
    """

    def test_compare_identical(self):
        """
        Test the comparison of identical objects.
        """
        package1 = Package(name="name", version="1.0.0", distro="Fedora")

        package2 = Package(name="name", version="1.0.0", distro="Fedora")

        assert package1 == package2

    def test_compare_different(self):
        """
        Test the comparison of different objects.
        """

# Path: hotness/domain/package.py
# class Package:
#     """
#     Internal representation of package object.
# 
#     Attributes:
#         name (str): Name of the package
#         version (str): Latest version of the package
#         distro (str): Distribution assigned
#     """
# 
#     def __init__(self, name: str, version: str, distro: str) -> None:
#         """
#         Class constructor
#         """
#         self.name = name
#         self.version = version
#         self.distro = distro
# 
#     def to_dict(self) -> dict:
#         """
#         Convert object to dictionary.
# 
#         Return:
#             Dictionary created from package object.
#         """
#         return {"name": self.name, "version": self.version, "distro": self.distro}
# 
#     @classmethod
#     def from_dict(cls, package_dict: dict) -> object:
#         """
#         Convert dictionary to object.
# 
#         Params:
#             package_dict: Dictionary to create package from.
# 
#         Return:
#             Package object.
#         """
#         package = Package(
#             name=package_dict["name"],
#             version=package_dict["version"],
#             distro=package_dict["distro"],
#         )
#         return package
# 
#     def __eq__(self, other: object) -> bool:
#         """
#         Compare method for package object.
# 
#         Params:
#             other: object to compare with
# 
#         Return:
#             Compare result.
#         """
#         return self.to_dict() == other.to_dict()  # type: ignore


# Path: tests/domain/test_package.py
from hotness.domain.package import Package

        Test object creation from dict.
        """
        package_dict = {"name": "name", "version": "1.0.0-rc1", "distro": "Fedora"}

        package = Package.from_dict(package_dict)

        assert package.name == "name"
        assert package.version == "1.0.0-rc1"
        assert package.distro == "Fedora"


class TestPackageEq:
    """
    Test class for `hotness.domain.package.__eq__` method.
    """

    def test_compare_identical(self):
        """
        Test the comparison of identical objects.
        """
        package1 = Package(name="name", version="1.0.0", distro="Fedora")

        package2 = Package(name="name", version="1.0.0", distro="Fedora")

        assert package1 == package2

    def test_compare_different(self):
        """
        Test the comparison of different objects.
        """

        package1 = Package(name="name", version="1.0.0", distro="Fedora")