tests/testthat/test-cleanData.R

context("cleanData")

test_that("cleanData gets to species level", {
  skip_on_cran()
	mouse <- findHost(genus="Peromyscus", species="leucopus", citation=FALSE)
	tmp <- cleanData(mouse, speciesOnly=TRUE)
	expect_is(tmp, "data.frame")
	expect_gte(nrow(mouse), nrow(tmp))
})


test_that("cleanData returns list when host species are validated", {
  skip_on_cran()
	mouse <- findHost(genus="Peromyscus", species="leucopus", citation=FALSE)
	tmp <- cleanData(mouse[1,] , speciesOnly=FALSE, validateHosts=TRUE)
	expect_is(tmp, "list")
})

Try the helminthR package in your browser

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

helminthR documentation built on Dec. 9, 2022, 1:06 a.m.