Filip Schouwenaars
Filip Schouwenaars
All great ideas, but I'd be curious to know what the syntax is, and how to unambiguously define these failures. I think @ramnathv's suggestion is a good start, but the...
Excerpt of `R/check-call.R`: ``` #' @param eval logical vector indicating whether and how to compare arguments. #' If \code{eval} is \code{NA}, student and solution argument are not #' compared. If...
Ah, now I see what you mean. In the context of checking function arguments, `check_equal` with an `eval` argument makes sense: ``` check_function('y') %>% check_arg('a') %>% check_equal(eval = FALSE) ```...
@richierocks I currently do not have time for this, but feel free to add this utility function in `testwhat_ext`.. If you make a PR, I'll gladly review it.
You can now use `eq_fun`, which I think is more intuitive. Still, this has to be documented properly.
@ramnathv This is what you can already do in `pythonwhat` (although it's not actively documented), and it could make sense to do it in `testwhat` as well. Worth considering.
This is much harder than anticipated for exercises that use the solution code or solution environment, such as `test_function()` and `test_object()`. Say for example that you want to check if...
@machow I'm afraid that `getParseData()` doesn't see them as 'just functions', but I'd have to dive more deeply to answer your question in a satisfying way.
I think that's a great idea! You're right that the R6 approach just uses the name of the class to then dispatch the method, but it could be more OO.
@machow that said, the syntax for calling an R6 method is different from the way S3 functions are called. R6 methods are also pretty terrible to debug, AFAIK.