Skip to content

Commit 10510e8

Browse files
committed
SKIIIIIIIIP
1 parent 9b87fb0 commit 10510e8

File tree

5 files changed

+30
-7
lines changed

5 files changed

+30
-7
lines changed

tests/testthat/helpers.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
skip_if_not_installed("modeldata")
2-
library(modeldata)
3-
41
library(dplyr)
52

63
# ------------------------------------------------------------------------------

tests/testthat/test-c5.R

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ library(dplyr)
33
test_that("formula method", {
44
skip_on_cran()
55
skip_if_not_installed("C50")
6+
skip_if_not_installed("modeldata")
67

78
ad_data <- make_ad_data()
89

@@ -42,6 +43,7 @@ test_that("formula method", {
4243
test_that("formula method - case weights", {
4344
skip_on_cran()
4445
skip_if_not_installed("C50")
46+
skip_if_not_installed("modeldata")
4547

4648
ad_data <- make_ad_data()
4749

@@ -86,6 +88,7 @@ test_that("formula method - case weights", {
8688
test_that("formula method - control", {
8789
skip_on_cran()
8890
skip_if_not_installed("C50")
91+
skip_if_not_installed("modeldata")
8992

9093
ad_data <- make_ad_data()
9194

@@ -126,6 +129,7 @@ test_that("formula method - control", {
126129
test_that("non-formula method", {
127130
skip_on_cran()
128131
skip_if_not_installed("C50")
132+
skip_if_not_installed("modeldata")
129133

130134
ad_data <- make_ad_data()
131135

@@ -166,6 +170,7 @@ test_that("non-formula method", {
166170
test_that("non-formula method - case weights", {
167171
skip_on_cran()
168172
skip_if_not_installed("C50")
173+
skip_if_not_installed("modeldata")
169174

170175
ad_data <- make_ad_data()
171176

@@ -212,6 +217,7 @@ test_that("non-formula method - case weights", {
212217
test_that("non-formula method - control", {
213218
skip_on_cran()
214219
skip_if_not_installed("C50")
220+
skip_if_not_installed("modeldata")
215221

216222
ad_data <- make_ad_data()
217223

@@ -281,6 +287,7 @@ test_that("updates", {
281287
test_that("mulit-predict", {
282288
skip_on_cran()
283289
skip_if_not_installed("C50")
290+
skip_if_not_installed("modeldata")
284291

285292
ad_data <- make_ad_data()
286293

@@ -417,12 +424,14 @@ test_that('check_args() works', {
417424
skip_on_cran()
418425
skip_if_not_installed("C50")
419426
skip_if_not_installed("parsnip", "1.2.1.9001")
427+
skip_if_not_installed("modeldata")
428+
420429
ad_data <- make_ad_data()
421430

422431
expect_snapshot(
423432
error = TRUE,
424433
{
425-
spec <- C5_rules(trees = c(1, 2, 3)) %>%
434+
spec <- C5_rules(trees = c(1, 2, 3)) %>%
426435
set_engine("C5.0") %>%
427436
set_mode("classification")
428437
fit(spec, Class ~ ., data = ad_data$ad_mod)
@@ -431,7 +440,7 @@ test_that('check_args() works', {
431440

432441
expect_snapshot(
433442
{
434-
spec <- C5_rules(trees = 0) %>%
443+
spec <- C5_rules(trees = 0) %>%
435444
set_engine("C5.0") %>%
436445
set_mode("classification")
437446
res <- fit(spec, Class ~ ., data = ad_data$ad_mod)
@@ -440,7 +449,7 @@ test_that('check_args() works', {
440449

441450
expect_snapshot(
442451
{
443-
spec <- C5_rules(trees = 1000) %>%
452+
spec <- C5_rules(trees = 1000) %>%
444453
set_engine("C5.0") %>%
445454
set_mode("classification")
446455
res <- fit(spec, Class ~ ., data = ad_data$ad_mod)
@@ -450,7 +459,7 @@ test_that('check_args() works', {
450459
expect_snapshot(
451460
error = TRUE,
452461
{
453-
spec <- C5_rules(min_n = c(1, 2, 3)) %>%
462+
spec <- C5_rules(min_n = c(1, 2, 3)) %>%
454463
set_engine("C5.0") %>%
455464
set_mode("classification")
456465
fit(spec, Class ~ ., data = ad_data$ad_mod)

tests/testthat/test-cubist.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ test_that("argument/call assembly", {
7878
test_that("formula method", {
7979
skip_on_cran()
8080
skip_if_not_installed("Cubist")
81+
skip_if_not_installed("modeldata")
8182

8283
chi_data <- make_chi_data()
8384

@@ -136,6 +137,7 @@ test_that("formula method", {
136137
test_that("formula method - case weights", {
137138
skip_on_cran()
138139
skip_if_not_installed("Cubist")
140+
skip_if_not_installed("modeldata")
139141

140142
chi_data <- make_chi_data()
141143

@@ -179,6 +181,7 @@ test_that("formula method - case weights", {
179181
test_that("formula method - limited rules", {
180182
skip_on_cran()
181183
skip_if_not_installed("Cubist")
184+
skip_if_not_installed("modeldata")
182185

183186
chi_data <- make_chi_data()
184187

@@ -217,6 +220,7 @@ test_that("formula method - limited rules", {
217220
test_that("formula method - limited rules and control", {
218221
skip_on_cran()
219222
skip_if_not_installed("Cubist")
223+
skip_if_not_installed("modeldata")
220224

221225
chi_data <- make_chi_data()
222226

@@ -256,6 +260,7 @@ test_that("formula method - limited rules and control", {
256260
test_that("formula method - control", {
257261
skip_on_cran()
258262
skip_if_not_installed("Cubist")
263+
skip_if_not_installed("modeldata")
259264

260265
chi_data <- make_chi_data()
261266

@@ -294,6 +299,7 @@ test_that("formula method - control", {
294299
test_that("non-formula method", {
295300
skip_on_cran()
296301
skip_if_not_installed("Cubist")
302+
skip_if_not_installed("modeldata")
297303

298304
chi_data <- make_chi_data()
299305

@@ -355,6 +361,7 @@ test_that("non-formula method", {
355361
test_that("non-formula method - case weights", {
356362
skip_on_cran()
357363
skip_if_not_installed("Cubist")
364+
skip_if_not_installed("modeldata")
358365

359366
chi_data <- make_chi_data()
360367

@@ -402,6 +409,7 @@ test_that("non-formula method - case weights", {
402409
test_that("non-formula method - limited rules", {
403410
skip_on_cran()
404411
skip_if_not_installed("Cubist")
412+
skip_if_not_installed("modeldata")
405413

406414
chi_data <- make_chi_data()
407415

@@ -444,6 +452,7 @@ test_that("non-formula method - limited rules", {
444452
test_that("non-formula method - limited rules and control", {
445453
skip_on_cran()
446454
skip_if_not_installed("Cubist")
455+
skip_if_not_installed("modeldata")
447456

448457
chi_data <- make_chi_data()
449458

@@ -483,6 +492,7 @@ test_that("non-formula method - limited rules and control", {
483492
test_that("non-formula method - control", {
484493
skip_on_cran()
485494
skip_if_not_installed("Cubist")
495+
skip_if_not_installed("modeldata")
486496

487497
chi_data <- make_chi_data()
488498

@@ -714,6 +724,8 @@ test_that('check_args() works', {
714724
skip_on_cran()
715725
skip_if_not_installed("Cubist")
716726
skip_if_not_installed("parsnip", "1.2.1.9001")
727+
skip_if_not_installed("modeldata")
728+
717729
chi_data <- make_chi_data()
718730

719731
expect_snapshot(

tests/testthat/test-rule-fit-binomial.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ library(dplyr)
55
test_that("formula method", {
66
skip_on_cran()
77
skip_if_not_installed("xrf")
8+
skip_if_not_installed("modeldata")
89

910
ad_data <- make_ad_data()
1011

@@ -90,6 +91,7 @@ test_that("formula method", {
9091
test_that("non-formula method", {
9192
skip_on_cran()
9293
skip_if_not_installed("xrf")
94+
skip_if_not_installed("modeldata")
9395

9496
ad_data <- make_ad_data()
9597

@@ -176,6 +178,7 @@ test_that("non-formula method", {
176178
test_that("tidy method - two classes", {
177179
skip_on_cran()
178180
skip_if_not_installed("xrf")
181+
skip_if_not_installed("modeldata")
179182

180183
ad_data <- make_ad_data()
181184

tests/testthat/test-rule-fit-regression.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ library(dplyr)
55
test_that("formula method", {
66
skip_on_cran()
77
skip_if_not_installed("xrf")
8+
skip_if_not_installed("modeldata")
89

910
chi_data <- make_chi_data()
1011

@@ -61,6 +62,7 @@ test_that("formula method", {
6162
test_that("non-formula method", {
6263
skip_on_cran()
6364
skip_if_not_installed("xrf")
65+
skip_if_not_installed("modeldata")
6466

6567
chi_data <- make_chi_data()
6668

0 commit comments

Comments
 (0)