testing.generators.templates.base

Module with template interface.

Templates are the components used to fill the generated structures with content. They are the building blocks for the generators. This way generated content can be controlled and customized.

class BaseTemplate[source]

Bases: BaseGenerator

Interface for templates used in generators.

BaseTemplate is also the subclass of BaseGenerator, all Templates implement BaseGenerator interface and are easy to interchange with other generators.

abstract generate() str[source]

Generates a string based on the template.

Returns

str

The generated string.