testthat icon indicating copy to clipboard operation
testthat copied to clipboard

Could the stack trace of `expect_no_*()` be reduced?

Open olivroy opened this issue 2 months ago • 1 comments

if I have the following


test_that("test", {

  expect_no_error(function_that_throws_a_warning())

})

I get the following trace in the build pane on Windows. I am noting that the expect_no_error() traceback takes 11 lines, but it doesn't seem very interesting to know that expect_no_error calls all these functions? Lines 2 to 11 don't feel relevant to me.

image

Is there a solution for that?

Verify also if the trace from expect_warning(regexp = NA) is smaller?

olivroy avatar May 23 '24 17:05 olivroy