datacamp / testwhat

Write Submission Correctness Tests for R exercises
https://datacamp.github.io/testwhat
GNU Affero General Public License v3.0
33 stars 25 forks source link

Issue with piped calls that don't have () #185

Open filipsch opened 6 years ago

filipsch commented 6 years ago
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.