tests/testthat/test-check_inventory.R

setDTthreads(1)

fn_zip <- system.file("extdata", "inv-test-files.zip", package = "eurocordexr")
tmpdir <- tempdir()
unzip(fn_zip, exdir = tmpdir)

test_that("simple checks", {
  expect_snapshot(check_inventory(get_inventory(fs::path(tmpdir, "testdata", "mixed-vars"))))
  expect_snapshot(check_inventory(get_inventory(fs::path(tmpdir, "testdata", "dup-ens"))))
  expect_snapshot(check_inventory(get_inventory(fs::path(tmpdir, "testdata", "incomplete-period"))))
})

Try the eurocordexr package in your browser

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

eurocordexr documentation built on Aug. 24, 2023, 9:07 a.m.