tests/testthat/test_knownDrugsGeneQuery.R

test_that("test knownDrugsGeneQuery works", {
  skip_on_cran()
  
  result <- knownDrugsGeneQuery(
    ensgId = "ENSG00000169174",
    size = 5
  )
  
  expect_true(is.null(result) || tibble::is_tibble(result) || is.data.frame(result))
  if (!is.null(result) && nrow(result) > 0) {
    expect_true(all(c(
      "phase", "status", "drug.id", "drug.name"
    ) %in% names(result)))
  }
})

Try the otargen package in your browser

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

otargen documentation built on Aug. 9, 2025, 1:08 a.m.