diff --git a/.travis.yml b/.travis.yml index f6aa1f53..6b1d4c24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,4 +24,4 @@ script: - travis_wait 120 R CMD check *tar.gz after_success: - - travis_wait Rscript -e 'covr::codecov()' + - travis_wait 120 Rscript -e 'covr::codecov()' diff --git a/r-package/tests/testthat/test-read_amazon.R b/r-package/tests/testthat/test-read_amazon.R index dba70018..1f17b4c1 100644 --- a/r-package/tests/testthat/test-read_amazon.R +++ b/r-package/tests/testthat/test-read_amazon.R @@ -1,18 +1,15 @@ -context("Read") - +context("read_amazon") # skip tests because they take too much time skip_if(Sys.getenv("TEST_ONE") != "") +testthat::skip_on_cran() +testthat::skip_on_travis() # Reading the data ----------------------- test_that("read_amazon", { - # skip tests because they take too much time - skip_on_cran() - skip_on_travis() - # read data expect_message(read_amazon(year=NULL)) test_sf <- read_amazon(year=2012) @@ -34,15 +31,8 @@ test_that("read_amazon", { # ERRORS and messagens ----------------------- test_that("read_amazon", { - # skip tests because they take too much time - skip_on_cran() - skip_on_travis() - - # Wrong year expect_error(read_amazon(year=9999999)) expect_error(read_amazon(year="xxx")) }) - - diff --git a/r-package/tests/testthat/test-read_biomes.R b/r-package/tests/testthat/test-read_biomes.R index 82def698..448833e9 100644 --- a/r-package/tests/testthat/test-read_biomes.R +++ b/r-package/tests/testthat/test-read_biomes.R @@ -1,17 +1,15 @@ -context("Read") +context("read_biomes") - -# Reading the data ----------------------- +# skip tests because they take too much time +skip_if(Sys.getenv("TEST_ONE") != "") +testthat::skip_on_cran() +testthat::skip_on_travis() +# Reading the data ----------------------- test_that("read_biomes", { - # skip tests because they take too much time - skip_on_cran() - # skip_on_travis() - - # read data expect_message(read_biomes(year=NULL)) test_sf <- read_biomes(year=2004) @@ -23,7 +21,7 @@ test_that("read_biomes", { expect_equal(test_sf$code_biome %>% length(), 10) # check projection -# expect_equal(sf::st_crs(test_sf)[[2]], "+proj=longlat +ellps=GRS80 +no_defs") + expect_equal(sf::st_crs(test_sf)[[2]], "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs") }) @@ -33,11 +31,6 @@ test_that("read_biomes", { # ERRORS and messagens ----------------------- test_that("read_biomes", { - # skip tests because they take too much time - skip_on_cran() - # skip_on_travis() - - # Wrong year expect_error(read_biomes(year=9999999)) expect_error(read_biomes(year="xxx")) diff --git a/r-package/tests/testthat/test-read_census_tract.R b/r-package/tests/testthat/test-read_census_tract.R index 5560562f..10ffe494 100644 --- a/r-package/tests/testthat/test-read_census_tract.R +++ b/r-package/tests/testthat/test-read_census_tract.R @@ -1,11 +1,12 @@ -context("Read") +context("read_census_tract") + +# skip tests because they take too much time +skip_if(Sys.getenv("TEST_ONE") != "") +testthat::skip_on_cran() +testthat::skip_on_travis() -test_that("read_census_tract", { - # skip tests because they take too much time - #skip_if(Sys.getenv("TEST_ONE") != "") - skip_on_cran() - # skip_on_travis() +test_that("read_census_tract", { # read data test_code_2000 <- read_census_tract(code_tract = 1100023, year = 2000) @@ -48,11 +49,6 @@ test_that("read_census_tract", { # ERRORS test_that("read_census_tract", { - # skip tests because they take too much time - #skip_if(Sys.getenv("TEST_ONE") != " ") - skip_on_cran() - # skip_on_travis() - # Wrong year and code expect_error(read_census_tract(code_tract = 9999999, year = 9999999)) expect_error(read_census_tract(code_tract = 9999999, year = "xxx")) diff --git a/r-package/tests/testthat/test-read_municipality.R b/r-package/tests/testthat/test-read_municipality.R index 7498d2be..2a6fce82 100644 --- a/r-package/tests/testthat/test-read_municipality.R +++ b/r-package/tests/testthat/test-read_municipality.R @@ -1,10 +1,12 @@ -context("Read") +context("read_municipality") + +# skip tests because they take too much time +skip_if(Sys.getenv("TEST_ONE") != "") +testthat::skip_on_cran() +testthat::skip_on_travis() -test_that("read_municipality", { - # skip tests because they take too much time - skip_on_cran() - # skip_on_travis() +test_that("read_municipality", { # read data test_code_1991 <- read_municipality(code_muni=1200179, year=1991) @@ -46,10 +48,6 @@ test_that("read_municipality", { # ERRORS test_that("read_municipality", { - # skip tests because they take too much time - skip_on_cran() - # skip_on_travis() - # Wrong year and code expect_error(read_municipality(code_muni=9999999, year=9999999)) expect_error(read_municipality(code_muni=9999999, year="xxx")) diff --git a/r-package/tests/testthat/test-read_statistical_grid.R b/r-package/tests/testthat/test-read_statistical_grid.R index 4b6a6d57..c3cd9fe6 100644 --- a/r-package/tests/testthat/test-read_statistical_grid.R +++ b/r-package/tests/testthat/test-read_statistical_grid.R @@ -1,11 +1,14 @@ -context("Read") +context("read_statistical_grid") + +# skip tests because they take too much time +skip_if(Sys.getenv("TEST_ONE") != "") +testthat::skip_on_cran() +testthat::skip_on_travis() -test_that("read_statistical_grid", { - # skip tests because they take too much time - skip_on_cran() - # skip_on_travis() + +test_that("read_statistical_grid", { # read data test_quad_code <- read_statistical_grid(code_grid=44, year=2010) @@ -44,10 +47,6 @@ test_that("read_statistical_grid", { # ERRORS test_that("read_statistical_grid", { - # skip tests because they take too much time - skip_on_cran() - # skip_on_travis() - # Wrong year and code expect_error(read_statistical_grid(code_grid=9999999, year=9999999)) expect_error(read_statistical_grid(code_grid=9999999, year="xxx"))