Represents the results of running a test case against a global environment. Contains metadata about the passing/failing of the test case as well as a reference to the test case itself.
passedWhether the test passed
errorAn error raised by executing the test, if any
test_caseThe TestCase that this result tracks
new()Create a test case result.
TestCaseResult$new(passed, error, test_case)passedWhether the test passed
errorAn error raised by executing the test, if any
test_caseThe TestCase that this result tracks
get_score()Get the score earned for this test case, accounting for whether the test passed or failed.
TestCaseResult$get_score()The score
repr()Convert this result into a human-readable string for display.
TestCaseResult$repr()The string representation of this result
to_list()Convert this result to a JSON-compatible list with all of its fields.
TestCaseResult$to_list()The list representation of this result
get_message()Get the message to be displayed to the student based on whether the test case passed or failed, if any.
TestCaseResult$get_message()The message or NA
clone()The objects of this class are cloneable with this method.
TestCaseResult$clone(deep = FALSE)deepWhether to make a deep clone.