path
. By default it runs only the package tests, but it can also run
vignette and example code.
package_coverage(path = ".", type = c("tests", "vignettes", "examples", "all", "none"), combine_types = TRUE, relative_path = TRUE, quiet = TRUE, clean = TRUE, line_exclusions = NULL, function_exclusions = NULL, code = character(), ..., exclusions)
TRUE
(the default) the coverage for all types
is simply summed into one coverage object. If FALSE
separate objects
are used for each type of coverage.print\.
to match print methods.testInstalledPackage
testInstalledPackage
to run the
code, if you would like to test your package in another way you can set
type = "none"
and pass the code to run as a character vector to the
code
parameter. unix
Parallelized code using mcparallel
needs to be use a patched mcparallel:::mcexit
. This is done
automatically if the package depends on parallel, but can also be explicitly
set using the environment variable COVR_FIX_PARALLEL_MCEXIT
or the
global option covr.fix_parallel_mcexit
.
exclusions
For details on excluding parts of the
package from the coverage calculations.