testwhat icon indicating copy to clipboard operation
testwhat copied to clipboard

Issue with piped calls that don't have ()

Open filipsch opened this issue 6 years ago • 0 comments

pec <- '
library(magrittr)
df <- data.frame(a = 1:3, b = 1:3)
'

sol_code <- '
df %>% cor()
'

stu_code <- "
df %>% cor
"

library(testwhat)
setup_state(pec = pec, sol_code = sol_code, stu_code = stu_code)

ex() %>% check_function('cor')

Fails, but shouldn't, because it's valid magrittr code!

Pretty big bug, can affect a lot of courses.

filipsch avatar Jul 19 '18 14:07 filipsch