-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathtest_ctx.R
More file actions
31 lines (26 loc) · 827 Bytes
/
test_ctx.R
File metadata and controls
31 lines (26 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
library(tinytest)
library(tiledb)
tiledb_ctx(limitTileDBCores())
#test_that("tiledb_ctx default constructor", {
ctx <- tiledb_ctx()
expect_true(is(ctx, "tiledb_ctx"))
#})
#test_that("tiledb_ctx constructor with tiledb_config", {
cfg <- tiledb_config(c(foo = "bar"))
ctx <- tiledb_ctx(cfg)
expect_true(is(ctx, "tiledb_ctx"))
ctx_cfg <- tiledb::config(ctx)
expect_equal(cfg["foo"], ctx_cfg["foo"])
# })
#test_that("tiledb_ctx constructor with named vector config", {
ctx <- tiledb_ctx(c(foo = "bar"))
expect_true(is(ctx, "tiledb_ctx"))
cfg <- tiledb::config(ctx)
expect_true(is(cfg, "tiledb_config"))
expect_equal(cfg["foo"], c(foo = "bar"))
# })
#test_that("tiledb_ctx tiledb_is_supported_fs works", {
ctx <- tiledb_ctx()
expect_true(tiledb_is_supported_fs("file"))
expect_error(tiledb_is_supported_fs("should_error"))
#})