tmt.templates package
Module contents
- class tmt.templates.TemplateManager(custom_template_path: Path | None = None)
Bases:
objectTemplate manager class.
It provides methods for rendering templates during story, plan or test creation.
- property custom_templates: dict[str, dict[str, Path]]
Return all custom templates.
- property default_templates: dict[str, dict[str, Path]]
Return all default templates.
- render_default_plan() str
Return default plan template.
- render_file(path: Path, **variables: Any) str
Render template from given file path. :param path: path to the template file. :param variables: variables to be passed to the template.
- render_from_url(url: str, **variables: Any) str
Render template from given URL. :param url: URL to the template file. :param variables: variables to be passed to the template.
- property templates: dict[str, dict[str, Path]]
Return all available templates (default and optional).