Open maelle opened 1 month ago
The manual page for expect_s4_class() and expect_s3_class() states that the class argument can be
expect_s4_class()
expect_s3_class()
class
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.
methods::is()
I suspect using more than one class in expect_s4_class() might not make any sense :sweat_smile: but maybe the documentation of the parameter could be rephrased slightly?
The manual page for
expect_s4_class()
andexpect_s3_class()
states that theclass
argument can beHowever it is not true for
expect_s4_class()
that useshttps://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 :sweat_smile: but maybe the documentation of the parameter could be rephrased slightly?