tests/testthat/test-weather_history.R

with_mock_api({
  test_that("need to provide weather variables", {
    expect_error(
      weather_history(
        c(45.46427, 9.18951),
        "2020-01-01",
        "2020-01-03"
      ),
      "hourly or daily measure not supplied"
    )
  })
})

Try the openmeteo package in your browser

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

openmeteo documentation built on Oct. 25, 2023, 5:07 p.m.