Skip to content

Commit 819df39

Browse files
committed
add period to msg, fix test_function old exception check
1 parent a6a5ea9 commit 819df39

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pythonwhat/check_funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def call(args,
370370
from pythonwhat.tasks import ReprFail, UndefinedValue
371371
from pythonwhat import utils
372372
def has_expr(incorrect_msg="FMT:Unexpected expression {test}: expected `{sol_eval}`, got `{stu_eval}` with values{extra_env}.",
373-
error_msg="Running an expression in the student process caused an issue",
373+
error_msg="Running an expression in the student process caused an issue.",
374374
undefined_msg="FMT:Have you defined `{name}` without errors?",
375375
extra_env=None,
376376
context_vals=None,

pythonwhat/test_funcs/test_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ def build_test(stud, sol, state, do_eval, eq_fun, feedback_msg, add_more, highli
454454
if do_eval:
455455

456456
eval_solution, str_solution = getResultInProcess(tree = sol, process = state.solution_process)
457-
if str_solution is None:
457+
if isinstance(str_solution, Exception):
458458
raise ValueError("Running an argument in the solution environment raised an error")
459459
if isinstance(eval_solution, ReprFail):
460460
raise ValueError("Couldn't figure out the argument: " + eval_solution.info)

0 commit comments

Comments
 (0)