context("files") fname <- paste(sample(unlist(strsplit("somecrazyfile", ""))), collapse = "") test_that("file not found is friendly", { expect_error(expect_warning(tidync(fname)), "No such file or directory") })