nealrichardson commented on PR #13786:
URL: https://github.com/apache/arrow/pull/13786#issuecomment-1231853241
Haven't looked at the PR lately but, as I understand it, `expand_across()`
takes a list of quosures and returns a list of quosures. So you should be able
to unit-test all of its behavior in isolation, and then you want one or two
tests in `mutate()` that it does the right thing in practice (integration
tests). Of course, doing everything in `mutate()` has its conveniences; you
could make it easier to write the unit tests with a test helper, something like:
```
expect_across_equal <- function(actual, expected) {
expect_identical(expand_across(actual), expected)
}
expect_across_equal(
quos(lgl, across(is.numeric, ~ . * 5)),
quos(lgl, int * 5, dbl * 5)
)
```
--
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]