You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The line number of runtime errors is extracted in TestResult._addResult and used to indicate which line, if any, should be highlighted for a particular test.
In the case of compile errors, this is achieved directly in the run_test function.
The latter function has access to whether the student code has been wrapped or not, and if so, how many lines of padding were added at the top of the file. The former does not; it is far too deep in the testing hierarchy to know that.
As a result, the incorrect line is highlighted for runtime errors in wrapped code. At the moment, this means they are off by one (but that could change if the wrapping changes).
Because the code is being execed, we don't have access to the actual source of the error line, meaning we can't match on that. Using a global would be possible, but for now I'd rather have the error than complicate the framework in that way.
The text was updated successfully, but these errors were encountered:
The line number of runtime errors is extracted in
TestResult._addResult
and used to indicate which line, if any, should be highlighted for a particular test.In the case of compile errors, this is achieved directly in the
run_test
function.The latter function has access to whether the student code has been wrapped or not, and if so, how many lines of padding were added at the top of the file. The former does not; it is far too deep in the testing hierarchy to know that.
As a result, the incorrect line is highlighted for runtime errors in wrapped code. At the moment, this means they are off by one (but that could change if the wrapping changes).
Because the code is being execed, we don't have access to the actual source of the error line, meaning we can't match on that. Using a global would be possible, but for now I'd rather have the error than complicate the framework in that way.
The text was updated successfully, but these errors were encountered: