tests/testthat/test.prune.R

#
# --- Test prune.R ---
#

data(geospiza)
gtree <- extractTree(geospiza)

context("prune")

test_that("prune works on phylo4 objects", {
    # function(phy, tip, trim.internal = TRUE, subtree = FALSE, ...)
    expect_equal(gtree, prune(gtree, character(0)))
})

test_that("prune works on phylo4d objects", {
    # function(phy, tip, trim.internal = TRUE, subtree = FALSE, ...)
    expect_equal(geospiza, prune(geospiza, character(0)))
})

Try the phylobase package in your browser

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

phylobase documentation built on March 26, 2020, 7:44 p.m.