Skip to content

Instantly share code, notes, and snippets.

@mikelove
Last active November 2, 2016 17:45
Show Gist options
  • Save mikelove/6f131201f7a17023d14a to your computer and use it in GitHub Desktop.
Save mikelove/6f131201f7a17023d14a to your computer and use it in GitHub Desktop.
testthat with filename information
my_test <- function() {
tests <- list.files("tests/testthat","test_.*")
for (i in seq_along(tests)) {
message(paste0(i," / ",length(tests),": ",tests[i]))
test(filter=sub("test_(.*).R","\\1",tests[i]))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment