Nothing
context("read_immediate_region")
# skip tests because they take too much time
skip_if(Sys.getenv("TEST_ONE") != "")
testthat::skip_on_cran()
# Reading the data -----------------------
test_that("read_immediate_region", {
# read data
expect_true(is( read_immediate_region(code_immediate = 11, year=2024) , "sf"))
expect_true(is( read_immediate_region(code_immediate = "AC", year=2024) , "sf"))
test_code_muni <- read_immediate_region(code_immediate = 110002, year=2024)
})
# ERRORS and messagens -----------------------
test_that("read_immediate_region", {
# Wrong year
testthat::expect_error(read_immediate_region())
testthat::expect_error(read_immediate_region(year = 9999999))
testthat::expect_error(read_immediate_region(year = "xxx"))
# wrong year and code_immediate
testthat::expect_error(read_immediate_region(code_immediate = "xxxx", year=9999999))
testthat::expect_error(read_immediate_region(code_immediate = 9999999, year="xxx"))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.