test_add_template_test_with_name() — flask Function Reference
Architecture documentation for the test_add_template_test_with_name() function in test_blueprints.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 7e6c23cf_8d10_cbf2_222c_1916f45f8835["test_add_template_test_with_name()"] 4366a441_d387_52f9_ec8d_1c41c71c00a8["test_blueprints.py"] 7e6c23cf_8d10_cbf2_222c_1916f45f8835 -->|defined in| 4366a441_d387_52f9_ec8d_1c41c71c00a8 style 7e6c23cf_8d10_cbf2_222c_1916f45f8835 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_blueprints.py lines 585–595
def test_add_template_test_with_name(app):
bp = flask.Blueprint("bp", __name__)
def is_boolean(value):
return isinstance(value, bool)
bp.add_app_template_test(is_boolean, "boolean")
app.register_blueprint(bp, url_prefix="/py")
assert "boolean" in app.jinja_env.tests.keys()
assert app.jinja_env.tests["boolean"] == is_boolean
assert app.jinja_env.tests["boolean"](False)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_add_template_test_with_name() do?
test_add_template_test_with_name() is a function in the flask codebase, defined in tests/test_blueprints.py.
Where is test_add_template_test_with_name() defined?
test_add_template_test_with_name() is defined in tests/test_blueprints.py at line 585.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free