Python test cases

Re: Python test cases

por Richard Lobb -
Número de respuestas: 0
If a test gives a runtime error, further testing is aborted. This is by design, to prevent, for example, repeatedly getting timeouts or compile errors on each test.

Usually, the error message issued to the student on the first failure is sufficient for them to correct their code and resubmit. You can adjust the penalty regime to give zero or minimal penalties for the first few submissions if you wish.

If you really wish to continue running tests after a runtime error, you should try to restructure your tests so that runtime errors (or output to the stderr stream which is taken as equivalent to a runtime error) is avoided. You might, for example, want to wrap your test in a try ... except structure, simply printing an error message if the attempt to call the student's method raises an exception.