Error in `eval_bare(quo_get_expr(.quo), quo_get_env(.quo))`: attempt to apply non-function

make_array <- function(shape = c(4, 4), chunks = c(2, 2), dtype = "<i4",
compressor = NA, fill_value = 0, order = "C") {
shape = shape, chunks = chunks, dtype = dtype,
store = MemoryStore$new(), compressor = compressor,
test_that("Zarr Array can load .zarray metadata", {
test_that("load_metadata_nosync handles list-style shape/chunks from JSON", {
a <- zarr_create(shape = c(3, 4), chunks = c(2, 2), store = d, compressor = NA)
test_that("cache_metadata=FALSE reloads metadata on each access", {
zarr_create(shape = c(4), chunks = c(2), store = d, compressor = NA)
b <- ZarrArray$new(store = DirectoryStore$new(d), cache_metadata = FALSE)
# Calling again exercises the refresh_metadata path a second time
test_that("Zarr Array can be resized", {
test_that("flush_metadata_nosync (V2) serializes filters on resize", {
filters = list(list(id = "zlib", level = 1L)),
test_that("Array write/read round-trip, MemoryStore, no compressor", {
store = MemoryStore$new(), compressor = NA
test_that("Array write/read round-trip, MemoryStore, Zstd compressor", {
store = MemoryStore$new(), compressor = ZstdCodec$new()
test_that("Array write/read round-trip, DirectoryStore, default compressor", {
test_that("Array persists to DirectoryStore and reopens correctly", {
a <- zarr_create(shape = c(4, 5), chunks = c(2, 5), store = d)
test_that("1D array write/read round-trip", {
test_that("3D array write/read round-trip", {
test_that("Array with fill_value=0 returns fill for unwritten chunks", {
store = MemoryStore$new(), fill_value = 0, compressor = NA
expect_equal(as.vector(result$data), c(0, 0, 0, 0))
test_that("Array metadata properties are correct", {
test_that("chunk_key produces dot-separated keys for V2", {
a <- make_array(shape = c(4, 4), chunks = c(2, 2))
a <- make_array(shape = c(5, 7), chunks = c(2, 3))
expect_equal(cs, c(3, 3))  # ceiling(5/2)=3, ceiling(7/3)=3
test_that("get_store returns the store", {
a <- zarr_create(shape = c(2), chunks = c(2), store = store)
test_that("get_path returns NA for root-level array", {
test_that("get_path returns path for nested array", {
g <- zarr_create_group(store = MemoryStore$new())
a <- g$create_dataset("mydata", shape = c(4), chunks = c(2), dtype = "<i4")
test_that("get_name returns NA for root array", {
test_that("get_name returns /path for nested array", {
test_that("get_basename returns NA for root array", {
test_that("get_basename returns last path segment", {
test_that("set_read_only changes read_only property", {
a <- zarr_create(shape = c(4), chunks = c(2), store = MemoryStore$new(), compressor = NA)
test_that("get_fill_value returns the configured fill value", {
a <- zarr_create(shape = c(4), chunks = c(2), store = MemoryStore$new(),
test_that("set_fill_value updates fill value in memory", {
test_that("get_order returns storage order", {
test_that("get_filters returns NA when no filters set", {
test_that("get_synchronizer returns NA by default", {
test_that("get_ndim returns number of dimensions", {
a <- make_array(shape = c(3, 4, 5), chunks = c(2, 2, 2))
test_that("get_is_view returns FALSE for normal array", {
test_that("get_oindex returns OIndex object", {
test_that("get_vindex returns VIndex object", {
test_that("get_write_empty_chunks returns TRUE by default", {
test_that("get_dimension_separator returns the separator", {
test_that("equals FALSE for read_only mismatch between two arrays", {
a <- zarr_create(shape = c(4), chunks = c(2), store = store1, compressor = NA)
b <- zarr_create(shape = c(4), chunks = c(2), store = store2, compressor = NA)
test_that("equals returns TRUE for self-equality", {
a <- zarr_create(shape = c(4), chunks = c(2), store = store, compressor = NA)
test_that("equals returns FALSE for different stores", {
b <- zarr_create(shape = c(4), chunks = c(2), store = MemoryStore$new(), compressor = NA)
test_that("equals returns FALSE for non-ZarrArray object", {
test_that("length returns first dimension size", {
# Note: length() uses `if(private$shape)` which errors on multi-element vectors
a <- zarr_create(shape = c(7), chunks = c(4), store = MemoryStore$new(), compressor = NA)
expect_error(`[<-.ZarrArray`(a, value = 1), "not yet supported")
test_that("get_parallel_settings returns lapply by default (no parallelism)", {
ps <- get_parallel_settings(parallel_option = NA)
result <- ps$apply_func(list(1, 2, 3), function(x) x * 2)
test_that("get_parallel_settings with integer option on non-Windows uses mclapply", {
ps <- get_parallel_settings(on_windows = FALSE, parallel_option = 2L)
result <- ps$apply_func(list(1, 2, 3), function(x) x * 2, cl = ps$cl)
test_that("get_parallel_settings with integer >1 on Windows creates cluster", {
ps <- get_parallel_settings(on_windows = TRUE, parallel_option = 2L)
test_that("get_parallel_settings with on_windows=TRUE and integer=1 creates cluster", {
ps <- get_parallel_settings(on_windows = TRUE, parallel_option = 1L)