Skip to content

docs: expect_s4_class() cannot accept a vector of classes #1989

Open
@maelle

Description

@maelle

The manual page for expect_s4_class() and expect_s3_class() states that the class argument can be

a character vector of class names

However it is not true for expect_s4_class() that uses

https://github.com/r-lib/testthat/blob/fe38519d72247a8907228a4ecaf926483aa5d4ff/R/expect-inheritance.R#L112C9-L112C20

where methods::is() only accepts one class.

I suspect using more than one class in expect_s4_class() might not make any sense 😅 but maybe the documentation of the parameter could be rephrased slightly?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions