testthat icon indicating copy to clipboard operation
testthat copied to clipboard

Handle errors in teardown files

Open gaborcsardi opened this issue 5 years ago • 3 comments

Currently they are ignored silently. They should probably trigger an error? (I.e. not a test failure.)

gaborcsardi avatar Sep 01 '20 09:09 gaborcsardi

This is a little tricky — they should be reported as an error, but they shouldn't prevent other teardown files from running.

hadley avatar Dec 03 '20 18:12 hadley

Can't we just throw the right expectation condition?

gaborcsardi avatar Dec 03 '20 18:12 gaborcsardi

I spent five minutes trying to wrap the appropriate calls in test_code() (which should get errors to propagate to the reporter correctly but couldn't get it to work). I'm going to leave it for a future release.

hadley avatar Dec 03 '20 18:12 hadley