tests/testthat/test-utils.R

prefix <- tempdir()

library(data.table)


test_that(
  desc = "correct functioning app utils",
  code = {

    plotdir <- paste0(prefix, "/plotdir/")
    csvdir <- paste0(prefix, "/csvdir/")

    vitual_onstart <- on_start(plotdir = plotdir,
                               csvdir = csvdir,
                               logfilename = paste0(prefix, "/log.txt"),
                               parallel = FALSE)
    expect_type(vitual_onstart, type = "list")


    # cleanup
    expect_silent(clean_up(plotdir = plotdir,
                           csvdir = csvdir))
    expect_true(file.remove(paste0(prefix, "/log.txt")))
  })

Try the rBiasCorrection package in your browser

Any scripts or data that you put into this service are public.

rBiasCorrection documentation built on June 21, 2022, 1:05 a.m.