diff --git a/R/terra_gdal_calc.R b/R/terra_gdal_calc.R index fac83ed7..1958fdef 100644 --- a/R/terra_gdal_calc.R +++ b/R/terra_gdal_calc.R @@ -253,7 +253,7 @@ terra_gdal_calc <- function(x, expr, file.exists(filename), msg = paste0( "failed to run `gdal_calc.py` script: output file \"", - filename, "\ does not exist" + filename, "\" does not exist" ) ) diff --git a/tests/testthat/test_create_spp_aoh_data.R b/tests/testthat/test_create_spp_aoh_data.R index 6e4dcb88..3648565a 100644 --- a/tests/testthat/test_create_spp_aoh_data.R +++ b/tests/testthat/test_create_spp_aoh_data.R @@ -87,6 +87,7 @@ test_that("simulated data (GDAL engine)", { skip_on_cran() skip_if_not_installed("gdalUtilities") skip_if_gdal_calc_not_available() + skip_on_os("mac") # specify file path f <- system.file("testdata", "SIMULATED_SPECIES.zip", package = "aoh") elevation_data <- terra::rast( @@ -549,6 +550,7 @@ test_that("small range data (rasterize_touches, engine = gdal)", { skip_on_cran() skip_if_not_installed("gdalUtilities") skip_if_gdal_calc_not_available() + skip_on_os("mac") # specify file path f <- system.file("testdata", "SIMULATED_SPECIES.zip", package = "aoh") elevation_data <- terra::rast( diff --git a/tests/testthat/test_create_spp_frc_data.R b/tests/testthat/test_create_spp_frc_data.R index 358050b6..0b1287d8 100644 --- a/tests/testthat/test_create_spp_frc_data.R +++ b/tests/testthat/test_create_spp_frc_data.R @@ -66,7 +66,8 @@ test_that("different engines produce same result", { # skip if needed skip_on_cran() skip_if_not_installed("gdalUtilities") - skip_if_gdal_calc_not_available() + skip_if_gdal_calc_not_available()\ + skip_on_os("mac") # specify file path f <- system.file("testdata", "SIMULATED_SPECIES.zip", package = "aoh") elevation_data <- terra::rast( diff --git a/tests/testthat/test_terra_gdal_calc.R b/tests/testthat/test_terra_gdal_calc.R index 45ea08f7..4d6ed5de 100644 --- a/tests/testthat/test_terra_gdal_calc.R +++ b/tests/testthat/test_terra_gdal_calc.R @@ -4,6 +4,7 @@ test_that("single layer (in memory)", { skip_on_cran() skip_if_not_installed("gdalUtilities") skip_if_gdal_calc_not_available() + skip_on_os("mac") # create data x <- terra::rast( ncols = 40, nrows = 40, xmin = -110, xmax = -90, ymin = 40, ymax = 60, @@ -23,6 +24,7 @@ test_that("two layers", { skip_on_cran() skip_if_not_installed("gdalUtilities") skip_if_gdal_calc_not_available() + skip_on_os("mac") # create data x <- terra::rast( ncols = 40, nrows = 40, xmin = -110, xmax = -90, ymin = 40, ymax = 60, @@ -43,6 +45,7 @@ test_that("three layers (in memory)", { skip_on_cran() skip_if_not_installed("gdalUtilities") skip_if_gdal_calc_not_available() + skip_on_os("mac") # create data x <- terra::rast( ncols = 40, nrows = 40, xmin = -110, xmax = -90, ymin = 40, ymax = 60, @@ -66,6 +69,7 @@ test_that("three layers (on disk)", { skip_on_cran() skip_if_not_installed("gdalUtilities") skip_if_gdal_calc_not_available() + skip_on_os("mac") # create paths f1 <- tempfile(fileext = ".tif") f2 <- tempfile(fileext = ".tif")