tests/testthat/test_resolver.R

test_that("Resolving names with GNR works", {
  taxa <- c("Fake Species", "Setophaga striata", "Setophaga megnolia", "Another fake species", "Setophaga angilae", "Setophaga plumbea", "Setophaga virens")
  expect_gte(length(taxa.new <- taxa_resolve_names_with_gnr(taxa)), 3)
  taxa <- c("Fake Species", "Another fake species")
  expect_warning(taxa.new <- taxa_resolve_names_with_gnr(taxa))
})

test_that("taxa_common_to_scientific", {
    skip("because it is not working")
    # the following is not working:
    taxa_common_to_scientific(taxa = "eudicots")
    taxa_common_to_scientific(taxa = "flowering plants")
})
phylotastic/rphylotastic documentation built on Aug. 22, 2023, 9:51 p.m.