tests/testthat/test-get_sounding.R

test_that("Downloading sounding profile", {
  skip_on_cran() # skip on CRAN due to frequently being recognized as DDOS attack
  profile = get_sounding(wmo_id = 12120, 
                         yy = 2010,
                         mm = 8, 
                         dd = 20, 
                         hh = 12)
  
  expect_equal(nrow(profile), 72)
  expect_true(is.data.frame(profile))
})

test_that("Sounding profile error", {
  skip_on_cran() # skip on CRAN due to frequently being recognized as DDOS attack
  expect_error(get_sounding(wmo_id = 99999, 
                            yy = 2010,
                            mm = 8, 
                            dd = 20, 
                            hh = 12)
               )

})

Try the thunder package in your browser

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

thunder documentation built on Nov. 11, 2023, 9:06 a.m.