testwhat
testwhat copied to clipboard
Issue with piped calls that don't have ()
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.