tests/testthat/test-databricks.R

test_that("using_databricks() works as expected", {
  withr::with_envvar(
    new = c("DATABRICKS_RUNTIME_VERSION" = "true"),
    expect_true(using_databricks())
  )

  withr::with_envvar(
    new = c("DATABRICKS_RUNTIME_VERSION" = NA),
    expect_false(using_databricks())
  )
})

Try the ami package in your browser

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

ami documentation built on April 4, 2025, 2:39 a.m.