Releases: datacamp/testwhat
Releases · datacamp/testwhat
Fix "environment defunct error"
In some cases, people are presented with the NULL environment defunct error
.
This appeared to be because of the way environments are passed around between testwhat
functions.
After realizing that environments are actually not necessary in testwhat
functions, as everything is standalone through the student_env
and solution_env
, all these arguments were removed from the code.
Improve documentation
Some improvements to the documentation.
Fix test_object, improve test_correct
test_object()
first checked if the classes correspond, then checks if the the values are ok. In some cases, this can cause issues with coercing (numeric and integer, for example). This has been wrapped in atest_correct()
like structure now.test_correct()
made use oftest_or()
behind the scenes, but the latter is less efficient.test_correct()
no longer usestest_or()
now.
Overall improvements and added functionality
- In
test_function()
, you can setincorrect_msg
to a vector of messages, corresponding to the arguments you want to check. That way, your custom feedback is argument-specific test_expression_result()
has been improved when theeq_conditoin = "equal"
- You can now specify a
count
of hits fortest_student_typed()
. - Added
test_predefined_objects()
, to check whether predefined objects are still ok. - Added
test_output_regex()
, to check whether the output contains a certain pattern (regex or exact matching are possible) test_what()
function cleaned up; you can only specify thefeedback
argument. This should be a character string or a list, containing at least a character string namedmessage
.