tests/testthat/test-check_tmhmm_installation.R

context("test-check_tmhmm_installation")

test_that("use", {
  if (!is_tmhmm_installed()) return()

  # Locally, TMHMM is expected to be installed
  expect_silent(check_tmhmm_installation())

  if (!is_on_ci()) return()

  expect_error(
    check_tmhmm_installation(folder_name = "nonsense"),
    "TMHMM binary not found at location '"
  )

  # Only bin
  folder_name <- tempdir()
  install_tmhmm_bin(folder_name = folder_name)
  expect_error(
    check_tmhmm_installation(folder_name = folder_name),
    "TMHMM not set up completely"
  )

})
richelbilderbeek/tmhmm documentation built on Sept. 3, 2022, 5:14 p.m.