"""Module for a base asteex reporter."""

from abc import ABC, abstractmethod


class ReportError(Exception):
    """Exception class for errors raised during the reporting."""


class Reporter(ABC):
    """Class for a base reporter."""

    @abstractmethod
    async def report(self, results):
        """Report test results.

        :param results: async iterable with :class:`Results <asteex.abstract.result.Result>`.
        :raises: :class:`ReportError`.
        """

    def __repr__(self):
        class_name = self.__class__.__name__

        return f"{class_name}()"
