Skip to content

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
thisisnic:GH-48145-testthat-update
Open

GH-48145: [R] Update to testthat 3.3.0 and use its expect_r6_class()#49333
thisisnic wants to merge 3 commits intoapache:mainfrom
thisisnic:GH-48145-testthat-update

Conversation

@thisisnic
Copy link
Member

@thisisnic thisisnic commented Feb 18, 2026

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?

  • Bump testthat requirement from >= 3.1.0 to >= 3.3.0
  • Remove custom expect_r6_class() from helper-expectation.R in favor of testthat's version
  • Replace expect_true(all(...)) with expect_all_true()
  • Replace expect_false(any(...)) / expect_true(all(!...)) with expect_all_false()
  • Replace expect_identical(dim(...), c(...)) with expect_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.

@thisisnic thisisnic requested a review from jonkeane as a code owner February 18, 2026 19:43
@thisisnic thisisnic marked this pull request as draft February 18, 2026 19:43
@github-actions
Copy link

⚠️ GitHub issue #48145 has been automatically assigned in GitHub to PR creator.

- 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
@thisisnic thisisnic marked this pull request as ready for review February 19, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments