tests/testthat/test-aggregateResult.R

context("Function aggregateResult")

skip("")

pathstd <- tempdir()

opts <- setSimulationPath(studyPathSV8)


test_that("test parallel aggregate", {
  
  mc_all_path <- file.path(opts$simDataPath, "mc-all", "grid", "digest.txt")
  
  mdate_original <- file.mtime(mc_all_path)
  
  parAggregateMCall(opts, nbcl = 2, mcYears = c(1,2), verbose = 0)
  
  expect_true(file.exists(mc_all_path))
  expect_false(file.mtime(mc_all_path) == mdate_original)
  expect_true(file.size(mc_all_path) > 0)
  
  mdate_original <- file.mtime(mc_all_path)
  
  parAggregateMCall(opts, nbcl = 1, mcYears = c(1,2), verbose = 0)
  
  expect_true(file.exists(mc_all_path))
  expect_false(file.mtime(mc_all_path) == mdate_original)
  expect_true(file.size(mc_all_path) > 0)
  
})
  

  

  

Try the antaresRead package in your browser

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

antaresRead documentation built on Aug. 31, 2023, 1:09 a.m.