Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Romain committed Feb 6, 2024
1 parent a0d9290 commit 693ddb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/test-merges_spatial.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test_that("merge_spatial preserve storage mode", {

test_that("merge_spatial works with SpatialPolygons", {
skip_if_not_installed("sp")
lakes <- as(splakes, "SpatialPolygons")
lakes <- as(sflakes, "SpatialPolygons")

las <- merge_spatial(las, lakes)
cn <- names(las)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-metrics_pixels.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ test_that("pixel_metric works with a RasterLayer as input instead of a resolutio
expect_equal(sum(is.na(m[])), 150L)

# --- no matching bbox
raster2 <- as(stars2, "Raster")

expect_warning(m <- pixel_metrics(las, f1, raster2), "Bounding boxes are not intersecting")
expect_true(is(m, "RasterLayer"))
Expand Down

0 comments on commit 693ddb2

Please sign in to comment.