## Minimal reprex from @gaborcsardi ```r test_that("x", { op <- options(warn = -1) warning("not see this") options(op) expect_true(TRUE) }) ``` ## Real world case If you run this in R, there is no warning: ```r out <- available.packages(repos = 'https://cloud.r-project.org', type = 'mac.binary.el-capitan') ``` However if you run this code anywhere in testthat: <img width="747" alt="Screen Shot 2019-11-04 at 8 44 45 PM" src="https://user-images.githubusercontent.com/216319/68152452-f8964480-ff43-11e9-9f57-bd7a1a57ace8.png"> This warning should never appear because [R sets `options(warn = -1L)` internally](https://github.com/wch/r-source/blob/c85acc47b4c3857b5a72f1871053bb5c90f2d08a/src/library/utils/R/packages.R#L87-L93).