Automatically test inputs to functions specified in a 'yaml' template.
Arguments
- yaml
A 'yaml' template as a character vector, either hand-coded or potentially loaded via readLines function or similar. Should generally be left at default of 'NULL', with template specified by 'filename' parameter.
- filename
Name (potentially including path) of file containing 'yaml' template. See at_yaml_template for details of template. Default uses template generated by that function, and held in local './tests' directory.
- test
If
FALSE
, return only descriptions of tests which would be run withtest = TRUE
, without actually running them.- test_data
Result returned from calling either autotest_types or autotest_package with
test = FALSE
that contains a list of all tests which would be conducted. These tests have an additional flag,test
, which defaults toTRUE
. Setting any tests toFALSE
will avoid running them whentest = TRUE
.- quiet
If 'FALSE', provide printed output on screen.
Value
An autotest_pkg
object, derived from a tibble, detailing
instances of unexpected behaviour for every parameter of every function.
See also
Other yaml:
at_yaml_template()
,
examples_to_yaml()
Examples
if (FALSE) { # \dontrun{
yaml_list <- examples_to_yaml (package = "stats", functions = "reshape")
res <- autotest_yaml (yaml = yaml_list)
} # }