Skip to content

Commit

Permalink
Add a test for the 'extensions' hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpfleming committed Apr 27, 2024
1 parent 0091b60 commit 0dc6bbb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_plugin/jinjanator_test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
from typing import Iterable, Mapping

from jinjanator_plugins import (
Extensions,
Filters,
FormatOptionUnsupportedError,
FormatOptionValueError,
Formats,
Globals,
Identity,
Tests,
plugin_extensions_hook,
plugin_filters_hook,
plugin_formats_hook,
plugin_globals_hook,
Expand Down Expand Up @@ -73,3 +75,8 @@ def plugin_formats() -> Formats:
@plugin_globals_hook
def plugin_globals() -> Globals:
return {"null": null_filter}


@plugin_extensions_hook
def plugin_extensions() -> Extensions:
return ["jinja2.ext.do"]

0 comments on commit 0dc6bbb

Please sign in to comment.