aboutsummaryrefslogtreecommitdiff
path: root/R/pkg/inst/tests/testthat/test_context.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/pkg/inst/tests/testthat/test_context.R')
-rw-r--r--R/pkg/inst/tests/testthat/test_context.R6
1 files changed, 5 insertions, 1 deletions
diff --git a/R/pkg/inst/tests/testthat/test_context.R b/R/pkg/inst/tests/testthat/test_context.R
index 0e5e15c0a9..95258babbf 100644
--- a/R/pkg/inst/tests/testthat/test_context.R
+++ b/R/pkg/inst/tests/testthat/test_context.R
@@ -27,6 +27,11 @@ test_that("Check masked functions", {
namesOfMasked <- c("describe", "cov", "filter", "lag", "na.omit", "predict", "sd", "var",
"colnames", "colnames<-", "intersect", "rank", "rbind", "sample", "subset",
"summary", "transform", "drop", "window", "as.data.frame")
+ namesOfMaskedCompletely <- c("cov", "filter", "sample")
+ if (as.numeric(R.version$major) == 3 && as.numeric(R.version$minor) > 2) {
+ namesOfMasked <- c("endsWith", "startsWith", namesOfMasked)
+ namesOfMaskedCompletely <- c("endsWith", "startsWith", namesOfMaskedCompletely)
+ }
expect_equal(length(maskedBySparkR), length(namesOfMasked))
expect_equal(sort(maskedBySparkR), sort(namesOfMasked))
# above are those reported as masked when `library(SparkR)`
@@ -36,7 +41,6 @@ test_that("Check masked functions", {
any(grepl("=\"ANY\"", capture.output(showMethods(x)[-1])))
}))
maskedCompletely <- masked[!funcHasAny]
- namesOfMaskedCompletely <- c("cov", "filter", "sample")
expect_equal(length(maskedCompletely), length(namesOfMaskedCompletely))
expect_equal(sort(maskedCompletely), sort(namesOfMaskedCompletely))
})