(self, env)
| 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 | |
| 185 | class TestParser: |