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

Method test_operators

tests/test_lexnparse.py:105–113  ·  view source on GitHub ↗
(self, env)

Source from the content-addressed store, hash-verified

103 assert tmpl.render() == pformat("foo") + "|" + pformat("bär")
104
105 def test_operators(self, env):
106 from jinja2.lexer import operators
107
108 for test, expect in operators.items():
109 if test in "([{}])":
110 continue
111 stream = env.lexer.tokenize(f"{{{{ {test} }}}}")
112 next(stream)
113 assert stream.current.type == expect
114
115 def test_normalizing(self, env):
116 for seq in "\r", "\r\n", "\n":

Callers

nothing calls this directly

Calls 2

itemsMethod · 0.80
tokenizeMethod · 0.80

Tested by

no test coverage detected