Skip to content

Commit de6e9cd

Browse files
authored
Merge pull request #345 from tidymodels/no-spark-tests
remove unit tests that execute spark and put them into the extratests package
2 parents a469d0a + 17d398a commit de6e9cd

File tree

6 files changed

+0
-635
lines changed

6 files changed

+0
-635
lines changed

tests/testthat/test_boost_tree_spark.R

Lines changed: 0 additions & 182 deletions
This file was deleted.

tests/testthat/test_descriptors.R

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -182,56 +182,6 @@ test_that("numeric y and dummy vars", {
182182

183183
# ------------------------------------------------------------------------------
184184

185-
context("spark descriptors")
186-
187-
test_that("spark descriptor", {
188-
189-
skip_if_not_installed("sparklyr")
190-
191-
library(sparklyr)
192-
library(dplyr)
193-
194-
sc <- try(spark_connect(master = "local"), silent = TRUE)
195-
196-
skip_if(inherits(sc, "try-error"))
197-
198-
npk_descr <- copy_to(sc, npk[, 1:4], "npk_descr", overwrite = TRUE)
199-
hpc_descr <- copy_to(sc, hpc, "hpc_descr", overwrite = TRUE)
200-
201-
# spark does not allow .x, .y, .dat; spark handles factors differently
202-
template2 <- purrr::partial(template, x = NULL, y = NULL, dat = NULL)
203-
eval_descrs2 <- purrr::partial(eval_descrs, not = c(".x", ".y", ".dat"))
204-
class_tab2 <- table(as.character(hpc$class), dnn = NULL)
205-
206-
expect_equal(
207-
template2(6, 4, 150, NA, 1),
208-
eval_descrs2(get_descr_form(compounds ~ ., data = hpc_descr))
209-
)
210-
expect_equal(
211-
template2(3, 1, 150, NA, 1),
212-
eval_descrs2(get_descr_form(compounds ~ class, data = hpc_descr))
213-
)
214-
expect_equal(
215-
template2(1, 1, 150, NA, 0),
216-
eval_descrs2(get_descr_form(compounds ~ input_fields, data = hpc_descr))
217-
)
218-
expect_equivalent(
219-
template2(4, 4, 150, class_tab2, 0),
220-
eval_descrs2(get_descr_form(class ~ ., data = hpc_descr))
221-
)
222-
expect_equal(
223-
template2(1, 1, 150, class_tab2, 0),
224-
eval_descrs2(get_descr_form(class ~ input_fields, data = hpc_descr))
225-
)
226-
expect_equivalent(
227-
template2(7, 3, 24, rev(table(npk$K, dnn = NULL)), 3),
228-
eval_descrs2(get_descr_form(K ~ ., data = npk_descr))
229-
)
230-
231-
})
232-
233-
# ------------------------------------------------------------------------------
234-
235185
context("Descriptor helpers")
236186

237187
test_that("can be temporarily overriden at evaluation time", {

tests/testthat/test_linear_reg_spark.R

Lines changed: 0 additions & 56 deletions
This file was deleted.

tests/testthat/test_logistic_reg_spark.R

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)