Skip to content

Commit

Permalink
use gdverse data in auto-test
Browse files Browse the repository at this point in the history
  • Loading branch information
SpatLyu committed Oct 27, 2024
1 parent f7e5923 commit 525a495
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Imports:
utils
Suggests:
cowplot,
GD,
knitr,
Rcpp,
readr,
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-data_type.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
test_that("data.frame works", {
expect_no_error({
g = opgd(NDVIchange ~ ., data = GD::ndvi_50,
data("ndvi")
g = opgd(NDVIchange ~ ., data = as.data.frame(ndvi),
discvar = c("Tempchange","Precipitation","GDP","Popdensity"),
discnum = 3:6, cores = 1)
})
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-multicores.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
test_that("multicores works", {
expect_equal(opgd(NDVIchange ~ ., data = GD::ndvi_50,
data("ndvi")
expect_equal(opgd(NDVIchange ~ ., data = ndvi,
discvar = c("Tempchange","Precipitation","GDP","Popdensity"),
discnum = 3:6, cores = 1),
opgd(NDVIchange ~ ., data = GD::ndvi_50,
opgd(NDVIchange ~ ., data = ndvi,
discvar = c("Tempchange","Precipitation","GDP","Popdensity"),
discnum = 3:6, cores = 2))
})

0 comments on commit 525a495

Please sign in to comment.