MCPcopy
hub / github.com/pallets/jinja / test_expressions

Method test_expressions

tests/test_api.py:95–103  ·  view source on GitHub ↗
(self, env)

Source from the content-addressed store, hash-verified

93 assert c.current == 1
94
95 def test_expressions(self, env):
96 expr = env.compile_expression("foo")
97 assert expr() is None
98 assert expr(foo=42) == 42
99 expr2 = env.compile_expression("foo", undefined_to_none=False)
100 assert is_undefined(expr2())
101
102 expr = env.compile_expression("42 + foo")
103 assert expr(foo=42) == 84
104
105 def test_template_passthrough(self, env):
106 t = Template("Content")

Callers

nothing calls this directly

Calls 2

is_undefinedFunction · 0.90
compile_expressionMethod · 0.80

Tested by

no test coverage detected