File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -221,3 +221,30 @@ def test_simple_block_tag_invalid_argument():
221
221
╰────
222
222
"""
223
223
)
224
+
225
+
226
+ def test_simple_block_tag_argument_syntax_error ():
227
+ template = "{% load repeat from custom_tags %}{% repeat a= %}{% endrepeat %}"
228
+
229
+ with pytest .raises (TemplateSyntaxError ) as exc_info :
230
+ engines ["django" ].from_string (template )
231
+
232
+ assert (
233
+ str (exc_info .value )
234
+ == "Could not parse the remainder: '=' from 'a='"
235
+ )
236
+
237
+ with pytest .raises (TemplateSyntaxError ) as exc_info :
238
+ engines ["rusty" ].from_string (template )
239
+
240
+ assert (
241
+ str (exc_info .value )
242
+ == """\
243
+ × Incomplete keyword argument
244
+ ╭────
245
+ 1 │ {% load repeat from custom_tags %}{% repeat a= %}{% endrepeat %}
246
+ · ─┬
247
+ · ╰── here
248
+ ╰────
249
+ """
250
+ )
You can’t perform that action at this time.
0 commit comments