tests/testthat/test-grid-var-order.R

context("test-grid-var-order")


f <- system.file("extdata/stars/reduced.nc", package= "ncmeta")
test_that("variable order by grid is correct", {
  
  ## FIXME
  skip("fixme")  ## only in nc-grids-normal branch
  ## descending by ndims, but otherwise native to the source
  vars_sort_by_ndims <- nc_vars(f) %>% dplyr::arrange(desc(ndims)) %>% dplyr::pull(name)
  expect_equal(nc_meta(f)$grid$variable, vars_sort_by_ndims)
  expect_equal(nc_grids(f)$variable, vars_sort_by_ndims)
})

Try the ncmeta package in your browser

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

ncmeta documentation built on Nov. 2, 2023, 5:57 p.m.