Error during check cases

Re: Error during check cases

by Richard Lobb -
Number of replies: 0

OK, I can see there are situations where you might want to continue when testing edge cases.

There's a related discussion in this forum thread. There's an alternative suggestion there, which you could consider if you're testing edge cases. You might be able to write your tests like:

try:
     answer = call_to_student_func(tricky_edge_case_params)
     print(answer)
except Exception as e:
     print(f"*** Exception ({e}) ***")

CodeRunner will then not see the runtime error, as it's caught by the test itself. Testing will then continue with the next test case.

However, that strategy doesn't work with write-a-whole-program questions. For those you'll need to use the template grader approach.