tests/testthat/helper-utils.R

testwd = function(x){
  dir = paste0("RUN-", x)
  if(file.exists(file.path("..", dir))) return()
  if(!file.exists(dir)) dir.create(dir)
  setwd(dir)
}

testrm = function(x){
  dir = paste0("RUN-", x)
  if(!file.exists(file.path("..", dir))) return()
  setwd("..")
  unlink(dir, recursive = T)
}
wlandau/parallelRemake documentation built on May 4, 2019, 8:44 a.m.