tinytest icon indicating copy to clipboard operation
tinytest copied to clipboard

Should errors in test files cause test execution to halt?

Open kevinushey opened this issue 8 months ago • 2 comments

To reproduce:

R --vanilla -s -e 'x <- 42; package.skeleton("use.tinytest")'
cd use.tinytest
R --vanilla -s -e 'tinytest::setup_tinytest(getwd())'
echo "stop()" > inst/tinytest/test_aaa.R
R --vanilla -s -e 'tinytest::run_test_dir()'

I see:

$ R --vanilla -s -e 'tinytest::run_test_dir()'
Error in eval(expr, envir = e) : 
Calls: <Anonymous> -> lapply -> FUN -> eval -> eval
Execution halted

Could tinytest instead capture errors seen when executing test files, and report those and allow other tests to continue executing? (Or at least, report what file the error was caught in, or other diagnostic information?)

kevinushey avatar Jun 12 '24 17:06 kevinushey