| local_testthat | R Documentation |
Local helper functions for package unit tests
local_bru_testthat_assign(x, values, envir = parent.frame())
local_bru_testthat_tolerances(
tolerances = c(1e-04, 0.01, 0.1),
envir = parent.frame()
)
local_bru_options_set(..., .reset = FALSE, envir = parent.frame())
local_basic_intercept_testdata()
local_basic_fixed_effect_testdata()
local_bru_safe_inla(multicore = FALSE, quietly = TRUE, envir = parent.frame())
local_bru_testthat_setup(envir = parent.frame())
x |
character; Name of variable to assign to |
values |
the object to assign to |
envir |
environment for exit handlers |
tolerances |
numeric vector of length 3; |
.reset |
For |
multicore |
logical; if |
quietly |
logical; if |
local_bru_options_set() returns a copy of the global override
options (not including the defaults), invisibly.
local_bru_testthat_assign(): Assign local variable. Useful for easy cleanup
of global workspace with withr::deferred_run() when running tests
interactively.
local_bru_testthat_tolerances(): Assign test tolerances
Assign local tolerance variables. Useful for easy cleanup
of global workspace with withr::deferred_run() when running tests
interactively.
local_bru_options_set(): Wrapper for bru_options_set_local(),
to locally override the global package options.
local_bru_safe_inla(): Tests should set num.threads = "1:1" to ensure
within-system repeatability by calling local_bru_safe_inla(); see also
bru_safe_inla()
local_bru_testthat_setup(): Initialise environment for tests.
Assigns tolerance variables.
To be called either at the top of a testfile, or inside tests.
Does not call local_bru_safe_inla(), since that may invoke a skip and
should be called inside each test that relies on INLA.
bru_options_set_local(), bru_options_default(),
bru_options_get()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.