testthat icon indicating copy to clipboard operation
testthat copied to clipboard

Consider Rmd reporter

Open hadley opened this issue 5 years ago • 4 comments

Drawing from https://github.com/ropenscilabs/testrmd

hadley avatar Dec 07 '20 15:12 hadley

I think this kind of reporter would also allow testthat to continue to be useful for autograding tools like nbgrader and otter-grader? In these contexts, we need test_that function calls to interactively throw an error. Currently to continue to use testthat for this purpose we are pinning to v2.3.*.

We have tried FailReporter, however, it incrementally keeps increasing the number of fails the more a code chunk or code cell is run in an interactive session, even if the code is corrected to make the test pass...

ttimbers avatar Aug 26 '21 16:08 ttimbers

@ttimbers it would be more useful to file an issue describing how you need test_that() to fail so we could fix the problem directly.

hadley avatar Aug 26 '21 18:08 hadley

I can certainly do that! I was just first reading through the issues first to see if anyone else had a similar need since the change from 2.3 > 3.0.

ttimbers avatar Aug 26 '21 19:08 ttimbers

OK, I tried to explain it here and give a reprex: https://github.com/r-lib/testthat/issues/1430

ttimbers avatar Aug 26 '21 20:08 ttimbers