Skip to content

Commit 1f3d0ff

Browse files
committed
has_expr only mentions extra_env if it is not empty
1 parent fb1ce22 commit 1f3d0ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pythonwhat/check_funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def parse_tree(n):
441441

442442
return state
443443

444-
def has_expr(incorrect_msg="FMT:Unexpected expression {test}: expected `{sol_eval}`, got `{stu_eval}` with values{extra_env}.",
444+
def has_expr(incorrect_msg="__JINJA__:Unexpected expression {{test}}: expected `{{sol_eval}}`, got `{{stu_eval}` {{'with values ' + extra_env if extra_env}}.",
445445
error_msg="Running an expression in the student process caused an issue.",
446446
undefined_msg="FMT:Have you defined `{name}` without errors?",
447447
extra_env=None,

0 commit comments

Comments
 (0)