-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Follow up on #18 #20
Follow up on #18 #20
Conversation
Current Aviator status
This PR was merged using Aviator.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
}) | ||
|
||
test_that('<str> == <str> :: "a" == "b"', { | ||
test_that(r"(<str> == <str> :: "a" == "b")", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If using raw strings is an issue, I would argue that we should use test_that('
instead so that we can have double quotes in test_that(desc=
without having to escape.
|
||
test_expr <- glue::glue(r"[ | ||
test_that('{desc} :: {expr$expression}', {{ | ||
test_that(r"({desc} :: {expr$expression})", {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using raw strings instead of "
from #18 (comment) because some expressions are using quotes, and so we'd have to escape them.
test_that(r"(<str> == <str> :: "a" == "b")", {
As opposed to perhaps this, which looks awful:
test_that("<str> == <str> :: \"a\" == \"b\"", {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raw strings will not work in older R, but we can change later if this becomes an issue.
4e32bb7
to
8ce0fcb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
|
||
test_expr <- glue::glue(r"[ | ||
test_that('{desc} :: {expr$expression}', {{ | ||
test_that(r"({desc} :: {expr$expression})", {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raw strings will not work in older R, but we can change later if this becomes an issue.
/aviator merge |
Aviator has accepted the merge request. It will enter the queue when all of the required status checks have passed. Aviator will update the sticky status comment as the pull request moves through the queue. |
8ce0fcb
to
42e44b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks! I had not considered the quotes issue in the test titles.
@@ -22,7 +22,8 @@ if (Sys.getenv("CI") == "" ) { | |||
fun = fun, | |||
udf = udfs[[fun]], | |||
data = tibble::as_tibble(args), | |||
expression = deparse(expr, nlines = 1L) | |||
expression = deparse(expr, nlines = 1L), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps more consistent with constructive::deparse_call()
, but no need to adapt now:
format(constructive::deparse_call(rlang::expr(1 + 2)))
#> [1] "1 + 2"
Created on 2024-02-09 with reprex v2.1.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'll block some time to actually learn about constructive
closes #19