From 1b9a33647eaef06f26f78b0e3ff9ecff75a4ea01 Mon Sep 17 00:00:00 2001 From: Steven Pawley Date: Fri, 4 Jul 2025 22:21:36 -0600 Subject: [PATCH 1/3] skip tests if offline and grass example dataset is not available --- tests/testthat/helper.R | 45 ++++++++++++++++++--------------- tests/testthat/test-execGRASS.R | 2 ++ tests/testthat/test-gmeta.R | 1 + tests/testthat/test-initGRASS.R | 4 +++ tests/testthat/test-options.R | 12 +++++++++ tests/testthat/test-read_RAST.R | 4 ++- tests/testthat/test-read_VECT.R | 3 +++ 7 files changed, 49 insertions(+), 22 deletions(-) diff --git a/tests/testthat/helper.R b/tests/testthat/helper.R index 372ce2245..16c08ae8f 100644 --- a/tests/testthat/helper.R +++ b/tests/testthat/helper.R @@ -1,29 +1,32 @@ download_nc_basic <- function() { + # online source + file_url <- "nc_basic_spm_grass7.zip" + base_url <- "https://grass.osgeo.org/sampledata" + path_url <- "north_carolina" + url <- paste(base_url, path_url, file_url, sep = "/") + + # local file path for download tmpdir <- tempdir() + zip_path <- file.path(tmpdir, file_url) - if (!file.exists(file.path(tmpdir, "nc_basic_spm_grass7.zip"))) { - base_url <- "https://grass.osgeo.org/sampledata" - path_url <- "north_carolina" - file_url <- "nc_basic_spm_grass7.zip" - - download.file( - paste(base_url, path_url, file_url, sep = "/"), - file.path(tmpdir, "nc_basic_spm_grass7.zip") - ) - - unzip( - file.path(tmpdir, "nc_basic_spm_grass7.zip"), - exdir = file.path(tmpdir, "grassdb") - ) - unlink(file.path(tmpdir, "nc_basic_spm_grass7.zip")) - } + # extraction directory + db_dir <- file.path(tmpdir, "grassdb") + + if (!file.exists(zip_path)) { + result <- try({ + suppressWarnings(download.file(url, zip_path, quiet = TRUE)) + }, silent = TRUE) - dataset <- list( - gisDbase = file.path(tmpdir, "grassdb"), - location = "nc_basic_spm_grass7" - ) + if (inherits(result, "try-error")) { + message("Failed to download GRASS GIS example dataset") + return(NULL) + } + + unzip(zip_path, exdir = db_dir) + unlink(zip_path) + } - return(dataset) + return(list(gisDbase = db_dir, location = "nc_basic_spm_grass7")) } get_gisbase <- function() { diff --git a/tests/testthat/test-execGRASS.R b/tests/testthat/test-execGRASS.R index da7744280..25f395a31 100644 --- a/tests/testthat/test-execGRASS.R +++ b/tests/testthat/test-execGRASS.R @@ -3,6 +3,7 @@ library(terra) test_that("testing basic doGRASS, execGRASS, stringexecGRASS", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") loc <- initGRASS( home = tempdir(), @@ -88,6 +89,7 @@ test_that("testing basic doGRASS, execGRASS, stringexecGRASS", { test_that("testing options doGRASS, execGRASS, stringexecGRASS", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") loc <- initGRASS( home = tempdir(), diff --git a/tests/testthat/test-gmeta.R b/tests/testthat/test-gmeta.R index 7de9da5fb..9cabc59be 100644 --- a/tests/testthat/test-gmeta.R +++ b/tests/testthat/test-gmeta.R @@ -3,6 +3,7 @@ library(terra) testthat::test_that("testing gmeta", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") # Initialize a temporary GRASS project using the example data loc <- initGRASS( diff --git a/tests/testthat/test-initGRASS.R b/tests/testthat/test-initGRASS.R index 70ea9e60b..ae121c176 100644 --- a/tests/testthat/test-initGRASS.R +++ b/tests/testthat/test-initGRASS.R @@ -3,6 +3,7 @@ library(terra) test_that("testing basic initGRASS", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") # Initialize a temporary GRASS project using the example data loc <- initGRASS( @@ -22,6 +23,7 @@ test_that("testing basic initGRASS", { test_that("testing initialization from SpatRaster", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") meuse_grid <- rast(system.file("ex/meuse.tif", package = "terra")) loc <- initGRASS(home = tempdir(), gisBase = gisBase, SG = meuse_grid, override = TRUE) @@ -30,6 +32,7 @@ test_that("testing initialization from SpatRaster", { test_that("testing remove_GISRC", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") loc <- initGRASS( home = tempdir(), @@ -52,6 +55,7 @@ test_that("testing remove_GISRC", { test_that("testing set/unset.GIS_LOCK", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") skip_if_not(Sys.info()["sysname"] == "Linux", "test only works on *nix") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") loc <- initGRASS( home = tempdir(), diff --git a/tests/testthat/test-options.R b/tests/testthat/test-options.R index 9b269f1f1..6169dde71 100644 --- a/tests/testthat/test-options.R +++ b/tests/testthat/test-options.R @@ -3,6 +3,8 @@ library(terra) test_that("testing ignore.stderrOption", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") + origIgnoreStderr <- get.ignore.stderrOption() loc <- initGRASS( @@ -36,6 +38,8 @@ test_that("testing ignore.stderrOption", { test_that("testing stop_on_no_flags_parasOption", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") + origStopOnNoFlagsParas <- get.stop_on_no_flags_parasOption() # testing stop_on_no_flags_parasOption set to TRUE by default @@ -67,6 +71,8 @@ test_that("testing stop_on_no_flags_parasOption", { test_that("testing echoCmdOption option", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") + origEchoCmd <- get.echoCmdOption() # testing echoCmdOption (set to FALSE by default) @@ -112,6 +118,8 @@ test_that("testing echoCmdOption option", { test_that("testing useInternOption option", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") + origUseIntern <- get.useInternOption() # testing echoCmdOption (set to FALSE by default) @@ -139,6 +147,8 @@ test_that("testing useInternOption option", { test_that("testing legacyExecOption option", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") + origLegacyExec <- get.legacyExecOption() # testing echoCmdOption (set to FALSE by default) @@ -180,6 +190,8 @@ test_that("testing legacyExecOption option", { test_that("testing defaultFlagsOption option", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") + origDefaultFlags <- get.defaultFlagsOption() # testing echoCmdOption (set to FALSE by default) diff --git a/tests/testthat/test-read_RAST.R b/tests/testthat/test-read_RAST.R index 6515b132c..cedcb1cc0 100644 --- a/tests/testthat/test-read_RAST.R +++ b/tests/testthat/test-read_RAST.R @@ -2,7 +2,7 @@ library(testthat) library(terra) library(sp) -if (!is.null(gisBase)) { +if (!is.null(gisBase) & !is.null(testdata)) { loc <- initGRASS( home = tempdir(), gisBase = gisBase, @@ -15,6 +15,7 @@ if (!is.null(gisBase)) { test_that("testing read_RAST using terra", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") # read a categorical raster map v1 <- read_RAST("landuse", cat = TRUE, return_format = "terra") @@ -33,6 +34,7 @@ test_that("testing read_RAST using terra", { test_that("testing read_RAST using sp", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") skip_on_ci() skip_on_cran() diff --git a/tests/testthat/test-read_VECT.R b/tests/testthat/test-read_VECT.R index a5bf13810..af13929ea 100644 --- a/tests/testthat/test-read_VECT.R +++ b/tests/testthat/test-read_VECT.R @@ -4,6 +4,7 @@ library(terra) # test basic read_VECT operation test_that("testing read_VECT", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") if (!is.null(gisBase)) { loc <- initGRASS( @@ -29,6 +30,7 @@ test_that("testing read_VECT", { test_that("testing write_VECT", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") shp <- vect(system.file("ex/lux.shp", package = "terra")) elev <- rast(system.file("ex/elev.tif", package = "terra")) @@ -49,6 +51,7 @@ test_that("testing write_VECT", { # test basic vect2neigh operation test_that("testing vect2neigh", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") + skip_if(is.null(testdata), "GRASS GIS example dataset is not available") if (!is.null(gisBase)) { loc <- initGRASS( From b35c3937d31b045adb4a72f8772527eae74282f6 Mon Sep 17 00:00:00 2001 From: Steven Pawley Date: Sat, 5 Jul 2025 10:03:15 -0600 Subject: [PATCH 2/3] remove unused test data in inst/ --- inst/etc/XML.r.out.gdal.rds | Bin 1064 -> 0 bytes inst/etc/res_r.water.outlet.rds | Bin 571 -> 0 bytes inst/pre_git_ChangeLog | 311 -------------------------------- 3 files changed, 311 deletions(-) delete mode 100644 inst/etc/XML.r.out.gdal.rds delete mode 100644 inst/etc/res_r.water.outlet.rds delete mode 100644 inst/pre_git_ChangeLog diff --git a/inst/etc/XML.r.out.gdal.rds b/inst/etc/XML.r.out.gdal.rds deleted file mode 100644 index b10d5d8a6e8148e16320d984075403a11df6546f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1064 zcmV+@1lRi?iwFP!000001JzjHZ`(EyR$@DjGYlAzZ7;VVk z*8+`S4kt)ushLC~6bqSPtp<%>!L|oAhT?mPmQe^2R0xgSUjp3i+&n-K8=7ctf_3-bwqH)JO zQ_hUj+C(SoJoWOaB>!eqlE{yfjA@#(a&AOa=;UrhVhpd{@cR!WH*fDkk#Ya9>mGvm zUjv&Hhunj~d1Ao?s$4Ld_DT({ctiLJvA|qVhLL!uQVbYwj>Izsa_$B zLXjl+@Q~^zMB}f*NjGtNJ(>-#X2bDUVl_ZFLRTuqB8Mbno|IftMiMem+VXK=z@Bhn z*u_&t%tT30yRz-mb&Qr^EALxyi^b?3vy33B0GTz;l_e-mxZx_}H#>*GB1B`eOaf0y zvl!jXCleGB#!OYVJK7S87MMrqg76jQA^5|A4gN^6rVGlb&MyxT?4E!qxu<09gR~31 z2w4)j6Y)lo`~7h2JP~oMh<<2L{WesJE;(eJN=Zm#3TamC;35m+$c2Cj40U*p@2C)$ z`+gCR!45p^1_umB;M#W!OUuVJbHXnZs;VSgV^^On?b+>o)G(^G%czQ?J+r601Jf#A zDUbKF`foS`T2E6(L%d)X;lFaI4A6bfuepBqylBA;T3(yZtKnq&ZPiJ<|3{wqYK&Ku zC1D5@jjyLjiCC|JNcX3Zcjd)YKrdcgM!Zwtwvq#dLkyCQ?7q3P^hG^&KDnr zV*=oWD-wR#+xeEcZQotyC}Uz>1}a=il+8;&4bXy+h90GOw>QPwE5cGIpTC8sNTW>Q zrSSYV|+OeO|$Y5&!`DQvbF9 diff --git a/inst/etc/res_r.water.outlet.rds b/inst/etc/res_r.water.outlet.rds deleted file mode 100644 index b550856f38485d13f1f41809340a2bf38d92f79b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 571 zcmV-B0>u3viwFP!000001I<)TkJB&^O`Bxv6#PH?aU$5II{aIID>7leQU;#PT+ zNo(Q6X6(?-pJ$mQcH0CNfy7E%De8>J&*S$zGhe1b5QIS#4udczGl)NZJb(I<)@I~P z=(|VXAcz|KE-rT50xnc(CD>l{#Tf!c4Quw8Eu`#%8&MdRp~@L&DRNQp4X{)oBvz<` zxA2tQ}rDn%vLrkWp4r1-44aWJegV~2@Fp-bzW6Jt>n8|Q@;7-tR(<*X-f zc@9ivtifG#v08vD`Z>(tnKPn-!1Omfx^!Hx8OLPY+30LrX>X4azLk_I^?qJTE41A2 zO~EA29;J|R3Oo1CSE%afI#Ffe7e{W9%pW~rPUxlnNtwruGMPfwBKwc|m%;S3@rmcLYl_+dqhv&|i0#)$5P-wTeN{yyvv*XtmX)S%Qd8zR$LhuskBI4oG9LHfbL+BPrKJSc>8SsoJ*ENxfBfuy?c7}E z4yZdsJIOk&)1sp5>gV{~dQv)W-FYAU>UTIze0wIjZ;R8K5(-^UYTqeT={vfkug9t8 zNE+0$>(J|bz^!?W#maEm8iWD&839NnB{RA*` JvNmA{0024+8H@k` diff --git a/inst/pre_git_ChangeLog b/inst/pre_git_ChangeLog deleted file mode 100644 index 31ccda049..000000000 --- a/inst/pre_git_ChangeLog +++ /dev/null @@ -1,311 +0,0 @@ -2018-11-23 08:42 rsbivand - - * DESCRIPTION, R/initGRASS.R, man/initGRASS.Rd: test gisBase for - bin and scripts - -2018-09-28 07:42 rsbivand - - * ChangeLog, inst/ChangeLog: tidy - -2018-09-24 08:40 rsbivand - - * ChangeLog, inst/ChangeLog: trial updates for OSGEO4W - -2018-09-24 08:39 rsbivand - - * DESCRIPTION, R/initGRASS.R, man/rgrass.Rd: trial updates for - OSGEO4W - -2017-10-20 19:02 rsbivand - - * DESCRIPTION, R/vect_link.R: fix SQLite writeVECT issue - -2017-10-12 10:37 rsbivand - - * DESCRIPTION, R/vect_link.R: OGR drivers Markus Metz fix - -2017-10-11 11:21 rsbivand - - * DESCRIPTION, R/vect_link.R: readVECT driver 7.3 bug resolved - -2016-11-18 14:18 rsbivand - - * DESCRIPTION, R/xml1.R: tidy - -2016-05-09 14:39 rsbivand - - * ChangeLog, inst/ChangeLog: tidy - -2016-05-09 14:38 rsbivand - - * DESCRIPTION: tidy - -2016-04-25 08:07 rsbivand - - * DESCRIPTION, NAMESPACE, R/AAA.R, R/initGRASS.R, R/vect_link.R, - man/initGRASS.Rd: tidy - -2016-04-11 12:13 rsbivand - - * ChangeLog, inst/ChangeLog: tidy - -2016-04-11 12:12 rsbivand - - * DESCRIPTION, R/xml1.R: WinNat *.bat issue - -2016-01-13 11:52 rsbivand - - * R/initGRASS.R, man/initGRASS.Rd: addon in initGRASS - -2016-01-13 08:47 rsbivand - - * DESCRIPTION: fix addons in initGRASS - -2016-01-12 19:17 rsbivand - - * ChangeLog, inst/ChangeLog: tidy - -2016-01-12 19:10 rsbivand - - * R/vect_link.R: fix Windows file transfer issue - -2016-01-12 14:09 rsbivand - - * R/xml1.R: addon bat files fix - -2016-01-11 14:07 rsbivand - - * ChangeLog, R/vect_link.R: vector layer tidy - -2016-01-11 13:51 rsbivand - - * DESCRIPTION, R/AAA.R, R/rgrass.R, R/xml1.R: attempt to make - addons visible under Windows - -2015-10-11 18:38 rsbivand - - * R/vect_link.R: Windows rgdal drivers issue - -2015-10-11 18:32 rsbivand - - * R/vect_link.R: Windows rgdal drivers issue - -2015-10-11 13:48 rsbivand - - * R/vect_link.R: Windows rgdal drivers issue - -2015-10-08 21:27 rsbivand - - * DESCRIPTION, R/vect_link.R: Windows rgdal drivers issue - -2015-09-25 09:02 rsbivand - - * NAMESPACE: importFrom(methods, slot, 'slot<-', as) - -2015-08-23 18:39 rsbivand - - * inst, inst/ChangeLog: tidy - -2015-08-23 18:38 rsbivand - - * ChangeLog: tidy - -2015-08-23 18:36 rsbivand - - * DESCRIPTION, NAMESPACE, R/bin_link.R, R/vect_link.R, - man/readVECT.Rd: adding long field names for vectors - -2015-08-17 19:03 rsbivand - - * DESCRIPTION, R/vect_link.R, man/readVECT.Rd: fix to vect2neigh - -2015-06-28 20:56 rsbivand - - * DESCRIPTION, NAMESPACE: CRAN - _R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_=true NAMESPACE tidy - -2015-06-18 16:31 rkrug - - * R/bin_link.R, R/vect_link.R: Fixed missing mapset in - .read_vect_plugin and .read_rast_plugin - - Thanks to Ahmadou H. DICKO - -2015-06-18 10:28 neteler - - * ChangeLog, DESCRIPTION, R/vect_link.R: rgrass7: R/vect_link.R: - fix for drivers other that ESRI Shapefile - -2015-05-20 18:20 rsbivand - - * R/xml1.R: check all integer matches - -2015-03-10 20:14 rsbivand - - * ChangeLog: tidy - -2015-03-10 20:10 rsbivand - - * DESCRIPTION, inst: tidy - -2015-03-10 20:02 rsbivand - - * man/readRAST.Rd: examples migrated to nc_basic - -2015-03-10 19:50 rsbivand - - * man/execGRASS.Rd, man/gmeta.Rd, man/readRAST.Rd, man/readVECT.Rd, - man/rgrass.Rd: examples migrated to nc_basic - -2015-03-10 18:54 rsbivand - - * DESCRIPTION: tidy - -2015-03-10 14:21 rsbivand - - * R/bin_link.R, man/execGRASS.Rd, man/initGRASS.Rd, - man/readRAST.Rd, man/readVECT.Rd, man/rgrass.Rd: examples - migrated to nc_basic - -2015-02-19 20:16 rsbivand - - * ., DESCRIPTION, R/rgrass.R, R/spgrass.R, man/rgrass.Rd, - man/spgrass.Rd: change name to rgrass7 - -2015-01-31 13:36 rsbivand - - * tidy - -2015-01-29 18:18 rsbivand - - * tidy - -2015-01-29 13:21 rkrug - - * Introduced several tryCatch() to delete files after error - - * based on - http://permalink.gmane.org/gmane.comp.gis.grass.stats/26 - similar potential problems were identified and code encapsulated - in - tryCatch blocks. - -2015-01-29 12:43 rkrug - - * Fixed Bug - http://permalink.gmane.org/gmane.comp.gis.grass.stats/26 - - * temporary files were not deleted upon error. - Wrapped tryCatch block around code. - -2015-01-28 14:16 rkrug - - * Added blocing for spgrass6 and spgrass7 unless correct GRASS GIS - version used - - * spgrass6, spgrass: added two internal functions: - .grassVersion(): returns GRASS GIS version used - .compatibleGRASSVersion(gv=.grassVersion()): returns TRUE if - GRASS GIS version - is compatible, FALSE if not. As an attribute, it returns an error - / status - message which can be printed. - - * spgrass6/AAA.R, spgrass7/AAA.R: added check for - .compatibleGRASSVersion() in .onAttach() - which raises error if GRASS GIS version is not compatible. The - result is that the - package can not be loaded in R when running in an incompatible - GRASS GIS version. - - * spgrass6/initGRASS.R, spgrass7/initGRASS.R: added check for - .compatibleGRASSVersion() - which raises error if GRASS GIS version is not compatible and - aborts initGRASS(). - -2015-01-27 13:05 rsbivand - - * update man pages arguments to match code (running R CMD check) - -2015-01-27 12:21 rsbivand - - * change name from spgrass to spgrass7 - -2015-01-27 11:30 rkrug - - * Refactorng of code from readVect and writeVect - - * introduced internal functions .read_vect_plugin and - .read_vect_non_plugin for actual reading and writing of vector - * moved reading of options from code into default values - (ignore.stderr, plugin, useGDAL) - * wrapped code in tryCatch to reset echoCmdOption - -2015-01-27 11:07 rkrug - - * Summary: Fixed renaming error and added . to internal functions - - * fixed renamin=g error of read_rast_... functions - * added . to function names read_rast_plugin and - .read_rast_non_plugin - -2015-01-27 10:36 rkrug - - * Summary: Rename internal functions to implement - - * renamed - read_plugin -->> read_rast_plugin - read_bin -->> read_rast_nonplugin - To have consistent naming scheme for reading vectors - -2015-01-27 10:26 rkrug - - * Streamlining of code - - * readRAST, writeRAST: changed default values in function - definitions - of ignore.stderr, plugin and useGDAL from NULL to the values - obtained by get....Option() - - * Moved closeAllConnections code outsude the try block to ensure - that opened connections are closed - -2015-01-27 10:00 rkrug - - * Summary: Setting of echoCmdOption fixed - - * readRAST: the resetting of echoCmdOption was only done if - return_SGDF was TRUE. Moved resetting to end of function call and - wrapped into tryCatch() block to reset echoCmdOOption even in - case of error. - - * writeRAST: Wrapped into tryCatch() block to reset - echoCmdOOption even in case of error. - -2015-01-26 14:58 rkrug - - * Summary: Move reading of raster non-plugin into extra function - - * created new internal function read_bin() which reads the - raster, equivalent to read_plugin() - -2015-01-26 13:32 rkrug - - * Spring cleaning for GRASS GIS 7 - - * remove references and code opnly used for grass 6 - * removed check for grass 7 - * changed name of .grassrc6 to .grassrc7 - -2015-01-20 11:50 neteler - - * manual update to G7 - -2015-01-18 20:04 rsbivand - - * adapt to G7 - -2015-01-15 18:12 rsbivand - - * adding development spgrass for 7 and future - From 9bd9854666805f8f2d50c8104cd364bfa6942f19 Mon Sep 17 00:00:00 2001 From: Steven Pawley Date: Sat, 5 Jul 2025 10:26:14 -0600 Subject: [PATCH 3/3] allow test to run that initiates GRASS from an spatRaster even in internet resources are not available --- tests/testthat/test-initGRASS.R | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/testthat/test-initGRASS.R b/tests/testthat/test-initGRASS.R index ae121c176..50a9cc6ec 100644 --- a/tests/testthat/test-initGRASS.R +++ b/tests/testthat/test-initGRASS.R @@ -23,7 +23,6 @@ test_that("testing basic initGRASS", { test_that("testing initialization from SpatRaster", { skip_if_not(!is.null(gisBase), "GRASS GIS not found on PATH") - skip_if(is.null(testdata), "GRASS GIS example dataset is not available") meuse_grid <- rast(system.file("ex/meuse.tif", package = "terra")) loc <- initGRASS(home = tempdir(), gisBase = gisBase, SG = meuse_grid, override = TRUE)