thisisnic commented on a change in pull request #11403:
URL: https://github.com/apache/arrow/pull/11403#discussion_r736633532



##########
File path: r/tests/testthat/helper-expectation.R
##########
@@ -158,35 +180,46 @@ expect_dplyr_error <- function(expr, # A dplyr pipeline 
with `input` as its star
   expect_error(
     rlang::eval_tidy(
       expr,
-      rlang::new_data_mask(rlang::env(input = record_batch(tbl)))
+      rlang::new_data_mask(rlang::env(.input = record_batch(tbl)))
     ),
     msg,
     ...
   )
   expect_error(
     rlang::eval_tidy(
       expr,
-      rlang::new_data_mask(rlang::env(input = arrow_table(tbl)))
+      rlang::new_data_mask(rlang::env(.input = arrow_table(tbl)))
     ),
     msg,
     ...
   )
 }
 
-expect_vector_equal <- function(expr, # A vectorized R expression containing 
`input` as its input
-                                vec, # A vector as reference, will make 
Array/ChunkedArray with
-                                skip_array = NULL, # Msg, if should skip Array 
test
-                                skip_chunked_array = NULL, # Msg, if should 
skip ChunkedArray test
-                                ignore_attr = FALSE, # ignore attributes?
-                                ...) {
+#' Compare vector
+#'
+#' Comparing the output of running expressions on R vectors against the same
+#' expression run on Arrow Arrays and ChunkedArrays.
+#'
+#' @param expr A vectorized R expression which must have `.input` as its start
+#' @param tbl A vector which will be substituted for `.input`
+#' @param skip_array The skip message to show (if you should skip the Array 
test)
+#' @param skip_chunked_array The skip message to show (if you should skip the 
ChunkedArray test)
+#' @param ignore_attr Ignore differences in specified attributes?
+#' @param ... additional arguments, passed to `expect_as_vector()`
+compare_vector <- function(expr,

Review comment:
       I like `compare_expression`, let's go with that.




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