Description Usage Arguments Details Value See Also
View source: R/check_correctness.R
This will run unit tests on the students' rmd file.
1 | check_correctness(e_stud, e_soln, test_fname)
|
e_stud |
The environment containing the output objects from running the studnent Rmd file. |
e_soln |
The environment containing the objects from the solution template. It will probably contain objects with the suffix "_soln". These will be tested against the versions generated by the student. |
test_fname |
The R script containing the test chunks. |
Prior to calling this, populate_soln_env
should
already have been called on the solution template, and the student
file should already have been knitted in order to generate the students'
objects. Of course, one could generate the test script independent of
populate_soln_env
, but the solution environment that contains
objects with a "_soln" suffix is also needed.
The student environment, solution environment, test file and the list of tests and expectations are the inputs to this function.
A data frame with one row, and the number of columns equal to the number of tests run plus the number of scalars to keep.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.