paleolimbot commented on a change in pull request #11534:
URL: https://github.com/apache/arrow/pull/11534#discussion_r745512223



##########
File path: r/tests/testthat/helper-expectation.R
##########
@@ -317,3 +317,7 @@ split_vector_as_list <- function(vec) {
   vec2 <- vec[seq(from = min(length(vec), vec_split + 1), to = length(vec), by 
= 1)]
   list(vec1, vec2)
 }
+
+err_helper <- function(...) (expect_error(...))

Review comment:
       My apologies if I'm missing this from a previous thread, but is there a 
reason we're not just using `expect_snapshot(..., error = TRUE)`? From the docs:
   
   ``` r
   test_that("you can't add a number and a letter", {
     expect_snapshot(1 + "a", error = TRUE)
   })
   ```
   
   The messageness or warningness of the output I believe is captured in the 
snap (since the snap contains the class of the condition).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to