Skip to contents

This function is used to set up the environment for running long tests. It calls two helper functions: setup_bboptions() and setup_longtetsts().

Usage

use_longtests()

Value

This function does not return a value. It is used for its side effects of setting up the environment for running long tests.

Details

The use_longtests() function is a wrapper function that calls setup_bboptions() and setup_longtetsts(). The setup_bboptions() function checks if the .BBSoptions file exists and creates it if it doesn't. It then checks the contents of the .BBSoptions file and adds or modifies the 'RunLongTests: TRUE' line as needed. The setup_longtetsts() function creates a 'longtests/testthat' directory if it doesn't exist and copies the 'tests/testthat.R' file into it. If the 'tests/testthat.R' file doesn't exist, it creates a new one with default content.

Examples

# Create the longtests directory and .BBSoptions file
use_longtests()
#>  The .BBSoptions file has been created.
#>  Adding RunLongTests: TRUE to the .BBSoptions file.
#>  The longtests directory has been created.
#>  Adding testthat.R to the longtests directory.

# Remove the longtests directory and .BBSoptions file
unlink(file.path(".BBSoptions"), recursive = TRUE, force = TRUE)
unlink(file.path("longtests"), recursive = TRUE, force = TRUE)