Skip to content

Commit 5f0225e

Browse files
committed
skips related to tunable registration
1 parent e9abdf5 commit 5f0225e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/testthat/test_extract.R

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ context("model extraction")
44
# ------------------------------------------------------------------------------
55

66
test_that('extract', {
7+
skip_if(
8+
rlang::is_installed("tune") |
9+
utils::packageVersion("tune") <= "0.1.6"
10+
)
11+
712
x <- linear_reg() %>% set_engine("lm") %>% fit(mpg ~ ., data = mtcars)
813
x_no_spec <- x
914
x_no_spec$spec <- NULL
@@ -21,6 +26,10 @@ test_that('extract', {
2126

2227
test_that('extract parameter set from model with no parameters', {
2328
skip_on_covr()
29+
skip_if(
30+
rlang::is_installed("tune") |
31+
utils::packageVersion("tune") <= "0.1.6"
32+
)
2433

2534
lm_model <- linear_reg() %>% set_engine("lm")
2635

@@ -31,6 +40,10 @@ test_that('extract parameter set from model with no parameters', {
3140

3241
test_that('extract parameter set from model with main and engine parameters', {
3342
skip_on_covr()
43+
skip_if(
44+
rlang::is_installed("tune") |
45+
utils::packageVersion("tune") <= "0.1.6"
46+
)
3447

3548
bst_model <-
3649
boost_tree(mode = "classification", trees = hardhat::tune("funky name \n")) %>%
@@ -55,6 +68,10 @@ test_that('extract parameter set from model with main and engine parameters', {
5568

5669
test_that('extract single parameter from model with no parameters', {
5770
skip_on_covr()
71+
skip_if(
72+
rlang::is_installed("tune") |
73+
utils::packageVersion("tune") <= "0.1.6"
74+
)
5875

5976
lm_model <- linear_reg() %>% set_engine("lm")
6077

@@ -65,6 +82,10 @@ test_that('extract single parameter from model with no parameters', {
6582

6683
test_that('extract single parameter from model with main and engine parameters', {
6784
skip_on_covr()
85+
skip_if(
86+
rlang::is_installed("tune") |
87+
utils::packageVersion("tune") <= "0.1.6"
88+
)
6889

6990
bst_model <-
7091
boost_tree(mode = "classification", trees = hardhat::tune("funky name \n")) %>%

0 commit comments

Comments
 (0)