Skip to content

GH-44674: [R] Fix R CMD check failure with dev testthat - #44675

Merged
amoeba merged 2 commits into
apache:mainfrom
amoeba:fix/GH-44674--testthat-devel-errors
Nov 8, 2024
Merged

amoeba merged 2 commits into
apache:mainfrom
amoeba:fix/GH-44674--testthat-devel-errors

Conversation

@amoeba

@amoeba amoeba commented Nov 7, 2024 •

Copy link
Copy Markdown
Member

Rationale for this change

Update assertion code in some of the R tests to be compatible with the in-development version of testthat.

What changes are included in this PR?

Updated assertions in tests.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

Fixes #44674.

@amoeba

amoeba commented Nov 7, 2024 •

Copy link
Copy Markdown
Member Author

A note about the patch here: I saw there were a number of ways to fix the issue, including just coercing everything to a vector. However, I thought it was cleaner to just directly use our internal expect_equal helper. See:

expect_true(all(concat_int == arrow_array(1:5)))
# can be fixed by wrapping it in as.vector
expect_true(as.vector(all(concat_int == arrow_array(1:5))))
# but this seems much cleaner to me
expect_equal(concat_int,  arrow_array(1:5)) # <-- this is what I went with

Can reviewers please check my assumption that expect_equal is doing what we want here?

@assignUser assignUser removed this from the 18.1.0 milestone Nov 8, 2024

@nealrichardson nealrichardson 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.

Makes sense to me, thank you!

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit ef83052.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

amoeba added a commit that referenced this pull request Nov 11, 2024
### Rationale for this change

Update assertion code in some of the R tests to be compatible with the in-development version of testthat.

### What changes are included in this PR?

Updated assertions in tests.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.

Fixes #44674.
* GitHub Issue: #44674

Authored-by: Bryce Mecum <petridish@gmail.com>
Signed-off-by: Bryce Mecum <petridish@gmail.com>
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.

[R] R CMD check failure with dev testthat

3 participants