GH-48145: [R] Update to testthat 3.3.0 and use its expect_r6_class()#49333
Open
thisisnic wants to merge 3 commits intoapache:mainfrom
Open
GH-48145: [R] Update to testthat 3.3.0 and use its expect_r6_class()#49333thisisnic wants to merge 3 commits intoapache:mainfrom
thisisnic wants to merge 3 commits intoapache:mainfrom
Conversation
…ass() Generated-by: Claude
|
|
- Replace expect_true(all(...)) with expect_all_true() - Replace expect_false(any(...)) with expect_all_false() - Replace expect_identical(dim(...), c(...)) with expect_shape() Generated-by: Claude
Generated-by: Claude
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
testthat 3.3.0 added several new expectation functions that we can use instead of our custom implementations or verbose patterns.
What changes are included in this PR?
expect_r6_class()from helper-expectation.R in favor of testthat's versionexpect_true(all(...))withexpect_all_true()expect_false(any(...))/expect_true(all(!...))withexpect_all_false()expect_identical(dim(...), c(...))withexpect_shape(..., dim = c(...))Are these changes tested?
Existing tests pass with the new expectations.
Are there any user-facing changes?
No.
This PR was generated by Claude. All outputs were reviewed and confirmed before pushing.