tests/testthat/test-KGClimateClass.R

context("KGClimateClass")

test_that("Test KGClimateClass function", {

  # Define a bounding box
  areaBox <- terra::ext(-3.82, -3.63, 52.41, 52.52)
  # Get climate classes
  x <- try(KGClimateClass(areaBox = areaBox), silent = TRUE)

  expect_that(all(dim(x) == c(1, 3)), equals(TRUE))

})
ropensci/hddtools documentation built on July 24, 2022, 6:29 p.m.