tests/testthat/helper-skip_if_no_anndata.R

# helper function to skip tests if we don't have the 'anndata' module
skip_if_no_anndata <- function() {
  have_anndata <- py_module_available("anndata")
  if (!have_anndata) {
    skip("anndata not available for testing")
  }
}

Try the anndata package in your browser

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

anndata documentation built on June 8, 2025, 9:35 p.m.