Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Disable recursive call check
  • Loading branch information
zero323 committed Jan 24, 2020
commit 097ea520c35e79781abebab98cd882a0eddab1ed
10 changes: 8 additions & 2 deletions R/pkg/tests/fulltests/test_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ test_that("cleanClosure on R functions", {
lapply(x, g) + 1 # Test for capturing function call "g"'s closure as a argument of lapply.
l$field[1, 1] <- 3 # Test for access operators `$`.
res <- defUse + l$field[1, ] # Test for def-use chain of "defUse", and "" symbol.
f(res) # Test for recursive calls.
# Enable once SPARK-30629 is fixed
# nolint start
# f(res) # Test for recursive calls.
# nolint end
}
newF <- cleanClosure(f)
env <- environment(newF)
Expand All @@ -101,7 +104,10 @@ test_that("cleanClosure on R functions", {
# nolint end
expect_true("g" %in% ls(env))
expect_true("l" %in% ls(env))
expect_true("f" %in% ls(env))
# Enable once SPARK-30629 is fixed
# nolint start
# expect_true("f" %in% ls(env))
# nolint end
expect_equal(get("l", envir = env, inherits = FALSE), l)
# "y" should be in the environment of g.
newG <- get("g", envir = env, inherits = FALSE)
Expand Down