Skip to content

Compare facet params instead of the whole objects in tests - #4294

Merged
yutannihilation merged 1 commit into
tidyverse:masterfrom
yutannihilation:fix/all.equal-ignore-env
Dec 9, 2020
Merged

yutannihilation merged 1 commit into
tidyverse:masterfrom
yutannihilation:fix/all.equal-ignore-env

Conversation

@yutannihilation

Copy link
Copy Markdown
Member

(As probably some of you also got the email about this,) all.equal() now compares environments on R-devel. And actually the GitHub Action runner on R-devel kept failing from some days ago. This pull request fixes it by narrowing the comparing from the whole ggproto objects to only the meaningful elements.

Note that, this behavior is consistent with that of expect_equal() in testthat 3rd edition, which uses waldo::compare() and it has no option to ignore the environment generally. If we stick with 2nd edition, we can use check.environment = FALSE as a workaround, but probably we will want to move to 3rd edition at some point, so I didn't choose check.environment.

@hadley hadley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

@yutannihilation
yutannihilation merged commit 5d72f63 into tidyverse:master Dec 9, 2020
@yutannihilation
yutannihilation deleted the fix/all.equal-ignore-env branch December 9, 2020 23:13
@yutannihilation

Copy link
Copy Markdown
Member Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants