tests/testthat/test-read_param_set_log.R

test_that("read_param_set_log works", {
  skip_if(Sys.getenv("CI") == "", message = "Run only on CI")

  # Find test environment file path
  log_file_path <- list.files(
    file.path("testdata", "logs"),
    full.names = TRUE,
    pattern = "robustness-22891163.log"
  )
  log_lines <- read_log_file(log_file_path = log_file_path)
  param_set <- read_param_set_log(
    log_lines = log_lines,
    log_file_path = log_file_path
  )

  expect_equal(param_set, 8)
})
Neves-P/DAISIErobustness documentation built on May 22, 2024, 4:26 p.m.