Closed chris-mcdo closed 1 year ago
Say I want to check a function has two arguments, a and b:
a
b
multiply <- function(a, b) a * b
As far as I can tell, the current behaviour is:
assert_function(multiply, args = "a")
assert_function(multiply, args = "c")
assert_function(multiply, args = c("a", "c"))
Am I missing something? Or is it currently not possible to check whether a function has specific arguments?
Thanks
Sorry, I cannot reproduce this issue. On my system, the last line also fails. Please try reinstalling and run the example in a new session. If the problem persists, please reopen.
Say I want to check a function has two arguments,
a
andb
:As far as I can tell, the current behaviour is:
assert_function(multiply, args = "a")
passes as expected.assert_function(multiply, args = "c")
fails as expected.assert_function(multiply, args = c("a", "c"))
passes, which is not what I expected.Am I missing something? Or is it currently not possible to check whether a function has specific arguments?
Thanks