achubaty/amc

fix faster-raster test failures

Closed this issue · 3 comments

> library(testthat)
> test_check("amc")
Loading required package: amc
1. Failure: faster-rasters functions produce correct results (@test-faster-rasters.R#36) 
identical(shpRas1_character, shpRas2b_character) isn't true.
2. Failure: faster-rasters functions produce correct results (@test-faster-rasters.R#44) 
`shpRas1_numeric` not identical to `shpRas2_numeric`.
Objects equal but not identical
Error in .local(.Object, ...) : 
3. Error: faster-rasters functions produce correct results (@test-faster-rasters.R#49) 
Cannot create a RasterLayer object from this file. (file does not exist)
1: fastRasterize(shp, origStack, field = "other", useGDAL = TRUE) at testthat/test-faster-rasters.R:49
2: raster(rstFilename)
3: raster(rstFilename)
4: .local(x, ...)
5: .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", ...)
6: stop("Cannot create a RasterLayer object from this file. (file does not exist)")
trying URL 'https://cran.rstudio.com/src/contrib/doParallel_1.0.11.tar.gz'
Content type 'application/x-gzip' length 172885 bytes (168 KB)
==================================================
downloaded 168 KB
trying URL 'https://cran.rstudio.com/src/contrib/BH_1.65.0-1.tar.gz'
Content type 'application/x-gzip' length 10839577 bytes (10.3 MB)
==================================================
downloaded 10.3 MB
testthat results ================================================================
OK: 95 SKIPPED: 1 FAILED: 3
1. Failure: faster-rasters functions produce correct results (@test-faster-rasters.R#36) 
2. Failure: faster-rasters functions produce correct results (@test-faster-rasters.R#44) 
3. Error: faster-rasters functions produce correct results (@test-faster-rasters.R#49) 
Error: testthat unit tests failed
Execution halted

passes locally (Ubuntu + macOS) and on Appveyor but not on travis-ci (Ubuntu):

testthat results ================================================================
  OK: 97 SKIPPED: 1 FAILED: 1
  1. Error: faster-rasters functions produce correct results (@test-faster-rasters.R#51) 
  
  Error: testthat unit tests failed
  Execution halted

also, note that the interactive portion of the fastRasterize example fails.

make sure rgdal being installed on R oldrel (done in de3dd45)

failures caused by missing gdal binary on travis; fixed in 3f09f88