if (sits_run_examples()) {
# recover config state
config_tests <- sits_run_tests()
# set active tests to FALSE
sits_config(run_tests = FALSE)
isFALSE(sits_run_tests())
# recover config state
# set active tests
sits_config(run_tests = TRUE)
# result should be true
isTRUE(sits_run_tests())
# restore previous state
sits_config(run_tests = config_tests)
}
Run the code above in your browser using DataLab