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



##########
File path: r/tests/testthat/test-dplyr-funcs-string.R
##########
@@ -120,10 +120,10 @@ test_that("paste, paste0, and str_c", {
 
   # sep is literal NA
   # errors in paste() (consistent with base::paste())
-  expect_error(
-    nse_funcs$paste(x, y, sep = NA_character_),
-    "Invalid separator"
-  )
+  expect_snapshot({
+    (expect_error(nse_funcs$paste(x, y, sep = NA_character_)))

Review comment:
       I tend to have it like this: 
   
   ```r
     (expect_error(
       nse_funcs$paste(x, y, sep = NA_character_)
     ))
   ```
   
   so that I can more easily select the `nse_funcs$paste(x, y, sep = 
NA_character_)` to e.g. copy and paste when developing the tests, but that 
makes more lines ... 
   
   `rlang` has this defined in its helpers: 
   
   ```r
   err <- function(...) (expect_error(...))
   ```




-- 
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