Skip to content

Comments

GH-48145: [R] Update to testthat 3.3.0 and use its expect_r6_class()#49333

Merged
thisisnic merged 3 commits intoapache:mainfrom
thisisnic:GH-48145-testthat-update
Feb 23, 2026
Merged

GH-48145: [R] Update to testthat 3.3.0 and use its expect_r6_class()#49333
thisisnic merged 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
@jonkeane
Copy link
Member

@github-actions crossbow submit test-r-arrow-backwards-compatibility test-r-versions

@github-actions
Copy link

Revision: a724e73

Submitted crossbow builds: ursacomputing/crossbow @ actions-a839e0224e

Task Status
test-r-arrow-backwards-compatibility GitHub Actions
test-r-versions GitHub Actions

Copy link
Member

@jonkeane jonkeane left a comment

Choose a reason for hiding this comment

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

Thanks for this. I've run our jobs which run older versions of R. Binaries are not available for testthat for those, but that's ok, and more importantly they pass just fine.

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Feb 22, 2026
@thisisnic thisisnic merged commit 61741aa into apache:main Feb 23, 2026
18 checks passed
@thisisnic thisisnic removed the awaiting merge Awaiting merge label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants