You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
testthat::test_that("get_code does not break if code uses quote", {
code<- c(
"expr <- quote(x <- x + 1)",
"x <- 0",
"eval(expr)"
)
tdata<- eval_code(teal_data(), code)
testthat::expect_identical(
get_code(tdata, datanames="x"),
code[2]
)
})
Should get_code return whole code vector, or only code[2]. We know that x is used in quote which is later evaluated. So far we can overcome this with # @linksto x tag
m7pr
changed the title
[Question]: Should get_code_dependency() automatically extract eval() and quote() if they appear together in the code
[Question]: Should get_code() automatically extract eval() and quote() if they appear together in the code
Jan 23, 2024
Initially discussed in here #268 (comment)
For cases like below
Should
get_code
return wholecode
vector, or onlycode[2]
. We know thatx
is used inquote
which is later evaluated. So far we can overcome this with# @linksto x
tagThe text was updated successfully, but these errors were encountered: