Skip to content

Commit

Permalink
improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Aariq committed Apr 11, 2024
1 parent 35a395a commit a659f7e
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions tests/testthat/test-geotargets-option.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,10 @@ targets::tar_test("geotargets_options_get() retrieves options in correct priorit
)
})

test_that("geotargets_option_set() works", {
geotargets_option_set(gdal_raster_driver = "COG")
expect_equal(getOption("geotargets.gdal.raster.driver"), "COG")
expect_equal(geotargets_option_get("gdal.raster.driver"), "COG")
expect_equal(geotargets_option_get("gdal_raster_driver"), "COG")
})


# targets::tar_test("Options are distributed to workers", {
# targets::tar_script({
# Sys.setenv("GEOTARGETS_GDAL_RASTER_DRIVER" = "COG")
# targets::tar_option_set(
# controller = crew::crew_controller_local(workers = 2)
# )
# list(
# targets::tar_target(
# opt,
# Sys.getenv("GEOTARGETS_GDAL_RASTER_DRIVER")
# )
# )
# })
# targets::tar_make()
# expect_equal(targets::tar_read(opt), "COG")
# })

0 comments on commit a659f7e

Please sign in to comment.