-
Notifications
You must be signed in to change notification settings - Fork 2.1k
when testing if an identifier refers to a calculated aesthetic, check the whole identifier, not a substring #917
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
Conversation
For the NEWS item, I think you can rewrite to: "Previously |
… the whole identifier, not a substring also, define the regex that is used for matching only once, in a hidden global variable fixes #834 Conflicts: R/layer.r Resolved by combining.
Added test, updated |
context("Layer") | ||
|
||
test_that("Correctly decide if a variable is a calculated aesthetic", { | ||
expect_true(ggplot2:::is_calculated_aes(aes(x=..density..))) |
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.
Tests are run in the package namespace, so you don't need ggplot2:::
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.
Doh. Fixed.
I just haven't found a good workflow for running new tests from within RStudio (without building the package or remembering difficult testthat
function calls). How do you test new tests?
when testing if an identifier refers to a calculated aesthetic, check the whole identifier, not a substring
Thanks! |
@krlmlr Could you please take at the check failures in https://github.com/wch/ggplot2-checkresults/blob/master/r-release/00check-summary.txt ? |
This probably isn't the source of this problem, but it does look like a bug. The regex should have have |
Thanks for catching the regex glitch, this was a copy-paste error. Harmless, but should be tested for and fixed anyway. I can bisect to search for a commit that introduces the error. It's only running |
Right. I can't how see your change would have broken this but it seems the most likely hypothesis. |
The |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Reissue of #835.