tests/testthat/test-list_geobr.R

context("lookup_muni")

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

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


test_that("lookup_muni", {


  # read data
  df <- list_geobr()

  # check number of cols
  expect_equal(ncol(df), 4)
  expect_true(is.data.frame(df))

})




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

  expect_error(list_geobr(1))
  expect_error(list_geobr('a'))

})

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.