tests/testthat/test-read_urban_concentrations.R

context("read_urban_concentrations")


# skip tests because they take too much time
testthat::skip_on_cran()
skip_if(Sys.getenv("TEST_ONE") != "")


# Reading the data -----------------------

test_that("read_urban_concentrations", {

  # read data and check sf object
  test_sf <- read_urban_concentrations()

  expect_true(is(test_sf, "sf"))

})



# ERRORS and messagens  -----------------------
test_that("read_urban_concentrations", {

  # Wrong year
  expect_error(read_urban_concentrations(year=9999999))

})

Try the geobr package in your browser

Any scripts or data that you put into this service are public.

geobr documentation built on Sept. 21, 2023, 9:07 a.m.