tests/testthat/helper-finch.R

ping_internet <- function() {
  w <- url('https://httpbin.org/get')
  res <- tryCatch(suppressWarnings(readLines(w)), error = function(e) e)
  on.exit(close(w))
  !inherits(res, "error")
}

Try the finch package in your browser

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

finch documentation built on Aug. 11, 2020, 9:06 a.m.