Skip to content

Provide stack backtrace for errors in student code#18

Open
marie-r wants to merge 1 commit intogradescope:masterfrom
marie-r:stacktrace
Open

Provide stack backtrace for errors in student code#18
marie-r wants to merge 1 commit intogradescope:masterfrom
marie-r:stacktrace

Conversation

@marie-r
Copy link

@marie-r marie-r commented Sep 5, 2020

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).

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments