Skip to content

Commit

Permalink
add test with crew workers
Browse files Browse the repository at this point in the history
  • Loading branch information
Aariq committed Apr 5, 2024
1 parent 1c5abb8 commit 2d7c43f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/testthat/test-geotargets-option.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# test_that("geotargets_options_get() retrieves options in correct priority", {
# withr::with_envvar(
#
# )
# })

targets::tar_test("options are distributed to workers", {
targets::tar_script({
options("geotargets.gdal.raster.driver" = "GeoJSON")
targets::tar_option_set(
controller = crew::crew_controller_local(workers = 2)
)
list(
targets::tar_target(
opt,
getOption("geotargets.gdal.raster.driver")
)
)
})
targets::tar_make()
expect_equal(targets::tar_read(opt), "GeoJSON")
})

0 comments on commit 2d7c43f

Please sign in to comment.