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

Method test_lineno_with_strip

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

Source from the content-addressed store, hash-verified

164 pytest.raises(TemplateSyntaxError, env.from_string, t)
165
166 def test_lineno_with_strip(self, env):
167 tokens = env.lex(
168 """\
169<html>
170 <body>
171 {%- block content -%}
172 <hr>
173 {{ item }}
174 {% endblock %}
175 </body>
176</html>"""
177 )
178 for tok in tokens:
179 lineno, token_type, value = tok
180 if token_type == "name" and value == "item":
181 assert lineno == 5
182 break
183
184
185class TestParser:

Callers

nothing calls this directly

Calls 1

lexMethod · 0.80

Tested by

no test coverage detected