tests/testthat/test-iotable_year_get.R

test_that("iotable_year_get() stops on error:", {
  expect_error(iotable_year_get(source = "germany_1995", 
                                geo = 'DE', unit = "MIO_NAC"))
  
 })

test_that("iotable_year_get() returns correct data:", {
  expect_equal(iotable_year_get(source = "germany_1995", 
                           geo = 'DE', unit = "MIO_EUR"),
               as.Date('1995-01-01'))
  
  })


#germany_1995 <- germany_1995 %>% mutate ( time = as.Date("1995-01-01"))
#usethis::use_data(germany_1995, overwrite = TRUE)

Try the iotables package in your browser

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

iotables documentation built on Sept. 24, 2022, 5:05 p.m.