"""Module for a base asteex generator."""

from abc import ABC, abstractmethod


class GenerationError(Exception):
    """Exception class for errors raised during the generation."""


class Generator(ABC):
    """Class for a base generator."""

    @abstractmethod
    def generate(self):
        """Generate test instances.

        :returns: async iterable with :class:`Instances <asteex.abstract.instance.Instance>`.
        :raises: :class:`GenerationError`.
        """

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

        return f"{class_name}()"
