tests/testthat/test_docs.r

# test any parts of the README or tutorial that aren't already part of the test
# suite. Note, the final example of the README makes a lot calls to NCBI, so is
# not included here
context("documentation")

test_that("Examples in documentation work", {
    #setup
    hox_paper <- entrez_search(db="pubmed", term="10.1038/nature08789[doi]")
    katipo_search <- entrez_search(db="popset", 
                                   term="Latrodectus katipo[Organism]")
    


    expect_that(hox_paper$ids, equals("20203609"))
    expect_true(katipo_search$count >= 6)
})

    

Try the rentrez package in your browser

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

rentrez documentation built on Nov. 11, 2020, 1:07 a.m.