gradescope / gradescope-utils

Python package for building Gradescope autograders
https://gradescope-utils.readthedocs.io/en/latest/
MIT License
33 stars 25 forks source link

Provide stack backtrace for errors in student code #18

Open marie-r opened 4 years ago

marie-r commented 4 years ago

When student code generates exceptions, e.g. IndexError, tests fail without any indication of the root cause, making it difficult for students to debug their code. This change to the JSON test runner provides context by outputting the last stack frame (easy to change for last N frames).

ibrahima commented 2 years ago

Thanks! This is a great idea, though I don't know if it should be the default behavior. It'd be preferable to make it configurable, either as a top-level setting on the JSONTestRunner object, or perhaps even a test-case-level setting via a decorator.