Skip to content
Myr

fix matching typo in tests, restore missing assert

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Dmitry Jemerov · committed by Dmitry Jemerov · parent 4e1bded · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:jinja2/testsuite/lexnparse.py+3 added-3 removed
167 unmodified lines
168 Template(code)169 except TemplateSyntaxError, e:170 assert str(e) == expected, 'unexpected error message'171 else:172 assert False, 'that was suposed to be an error'172 assert False, 'that was supposed to be an error'173174 assert_error('{% for item in seq %}...{% endif %}',175 "Encountered unknown tag 'endif'. Jinja was looking "176 "for the following tags: 'endfor' or 'else'. The "
11 unmodified lines
188 "following tags: 'endfor' or 'else'. The innermost block "189 "that needs to be closed is 'for'.")190 assert_error('{% block foo-bar-baz %}',191 "Block names in Jinja have to be valid Python identifiers "192 "and may not contain hypens, use an underscore instead.")192 "and may not contain hyphens, use an underscore instead.")193 assert_error('{% unknown_tag %}',194 "Encountered unknown tag 'unknown_tag'.")195196
129 unmodified lines
326327 def test_test_chaining(self):328 self.assert_raises(TemplateSyntaxError, env.from_string,329 '{{ foo is string is sequence }}')330 env.from_string('{{ 42 is string or 42 is number }}'330 assert env.from_string('{{ 42 is string or 42 is number }}'331 ).render() == 'True'332333 def test_string_concatenation(self):334 tmpl = env.from_string('{{ "foo" "bar" "baz" }}')
53 unmodified lines