tests/testthat/test-googler.R

test_that("googler works", {
  ## if python 3 not found then expect error
  #if (!googler:::py3_installed()) {
    #expect_error(googler("hello", count = 1))
  #} else {
    x <- googler("hello", count = 20)
    expect_true(is.data.frame(x))
    #expect_true(nrow(x) > 1)
    #expect_true(all(c("url", "abstract") %in% names(x)))
  #}
})

Try the googler package in your browser

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

googler documentation built on Sept. 4, 2019, 5:03 p.m.