Skip to content

Commit

Permalink
Silence warnings, tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemahoney218 committed Sep 26, 2023
1 parent 8535acd commit 09ae334
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# terrainr (development version)

* More tests are flagged to skip on CRAN, or when run offline

* `georeference_overlay` should give fewer useless warnings

# terrainr 0.7.4

* New query method is dramatically faster and less-error prone.
Expand Down
2 changes: 1 addition & 1 deletion R/georeference_overlay.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ georeference_overlay <- function(overlay_file,

image_read <- switch(file_type,
"png" = png::readPNG,
"tiff" = tiff::readTIFF,
"tiff" = \(x) suppressWarnings(tiff::readTIFF(x)),
"jpeg" = jpeg::readJPEG
)

Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-4-merge_rasters.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ test_that("merge_raster files are identical no matter the filename", {

test_that("fallback method works", {
skip_on_cran()
skip_if_offline()
# Just for time savings
skip_on_os(c("windows", "mac"))
df <- data.frame(
Expand Down Expand Up @@ -90,6 +91,7 @@ test_that("fallback method works", {

test_that("overwrite works as expected", {
skip_on_cran()
skip_if_offline()
test_file <- tempfile(fileext = ".tif")
test_copy <- tempfile(fileext = ".tif")

Expand Down

0 comments on commit 09ae334

Please sign in to comment.