2 Commits

Author SHA1 Message Date
Eric Lapouyade
cbbeae57bd Fix and improve get_undeclared_template_variables() method 2025-07-15 15:39:11 +02:00
Pablo Esteban
606d189787 - The get_undeclared_template_variables method now analyzes the original template, regardless of whether it has been rendered.
- Added optional context parameter to return only variables not present in the provided context.
- Added test tests/get_undeclared_variables.py:
    - Verifies behavior before rendering (all variables)
    - Verifies after rendering with incomplete context (only missing variables)
    - Verifies after rendering with complete context (empty set)
    - Verifies compatibility with custom Jinja2 environment
- All tests use asserts and are ready for CI integration.

Closes #585
2025-07-11 14:32:20 +02:00