Skip to content

Commit 86557c3

Browse files
committed
check_equal_part now uses EqualTest
1 parent d22a012 commit 86557c3

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

pythonwhat/check_funcs.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,8 @@ def has_equal_part(name, msg, state):
118118
'sol_part': state.solution_parts,
119119
'name': name}
120120

121-
if d['stu_part'][name] != d['sol_part'][name]:
122-
_msg = state.build_message(msg, d)
123-
rep.do_test(Test(Feedback(_msg, state.highlight)))
121+
_msg = state.build_message(msg, d)
122+
rep.do_test(EqualTest(d['stu_part'][name], d['sol_part'][name], Feedback(_msg, state.highlight)))
124123

125124
return state
126125

@@ -329,7 +328,6 @@ def call(args,
329328

330329
# Expression tests ------------------------------------------------------------
331330
from pythonwhat.tasks import ReprFail, UndefinedValue
332-
from pythonwhat.Test import EqualTest
333331
from pythonwhat import utils
334332
def has_expr(incorrect_msg="Unexpected expression: expected `{sol_eval}`, got `{stu_eval}` with values{extra_env}.",
335333
error_msg="Running an expression in the student process caused an issue",

0 commit comments

Comments
 (0)