Skip to content

[R][Dev] Update test helpers for testthat 3.3.0 #48145

@nealrichardson

Description

@nealrichardson

Describe the enhancement requested

Among the things I see in https://github.com/r-lib/testthat/blob/main/NEWS.md#testthat-330 is that there is now expect_r6_class() in testthat--we have our own implementation of that. A few other bullets in the news jump out as things that could be useful for us:

  • New expect_all_equal(), expect_all_true(), and expect_all_false() check that every element of a vector has the same value, giving better error messages than expect_true(all(...)).
  • New expect_shape() expects a specific shape (i.e., nrow(), ncol(), or dim())

Not urgent, just some test refactoring that could improve things.

Component(s)

R

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions