Minimal reprex:
Define this function in a package:
foo <- function() {
src <- dbplyr::src_memdb()
dbplyr::build_sql(
{sql("foo")},
con = src$con
)
}
Then call it in a test. testthat::test_check() succeeds but covr::package_coverage() fails. Remove the curly brackets around sql("foo") and it succeeds.