@@ -4,10 +4,7 @@ context("model extraction")
44# ------------------------------------------------------------------------------
55
66test_that(' extract' , {
7- skip_if(
8- rlang :: is_installed(" tune" ) |
9- utils :: packageVersion(" tune" ) < = " 0.1.6"
10- )
7+ skip_if(tune_check())
118
129 x <- linear_reg() %> % set_engine(" lm" ) %> % fit(mpg ~ . , data = mtcars )
1310 x_no_spec <- x
@@ -26,10 +23,7 @@ test_that('extract', {
2623
2724test_that(' extract parameter set from model with no parameters' , {
2825 skip_on_covr()
29- skip_if(
30- rlang :: is_installed(" tune" ) |
31- utils :: packageVersion(" tune" ) < = " 0.1.6"
32- )
26+ skip_if(tune_check())
3327
3428 lm_model <- linear_reg() %> % set_engine(" lm" )
3529
@@ -40,10 +34,7 @@ test_that('extract parameter set from model with no parameters', {
4034
4135test_that(' extract parameter set from model with main and engine parameters' , {
4236 skip_on_covr()
43- skip_if(
44- rlang :: is_installed(" tune" ) |
45- utils :: packageVersion(" tune" ) < = " 0.1.6"
46- )
37+ skip_if(tune_check())
4738
4839 bst_model <-
4940 boost_tree(mode = " classification" , trees = hardhat :: tune(" funky name \n " )) %> %
@@ -68,10 +59,7 @@ test_that('extract parameter set from model with main and engine parameters', {
6859
6960test_that(' extract single parameter from model with no parameters' , {
7061 skip_on_covr()
71- skip_if(
72- rlang :: is_installed(" tune" ) |
73- utils :: packageVersion(" tune" ) < = " 0.1.6"
74- )
62+ skip_if(tune_check())
7563
7664 lm_model <- linear_reg() %> % set_engine(" lm" )
7765
@@ -82,10 +70,7 @@ test_that('extract single parameter from model with no parameters', {
8270
8371test_that(' extract single parameter from model with main and engine parameters' , {
8472 skip_on_covr()
85- skip_if(
86- rlang :: is_installed(" tune" ) |
87- utils :: packageVersion(" tune" ) < = " 0.1.6"
88- )
73+ skip_if(tune_check())
8974
9075 bst_model <-
9176 boost_tree(mode = " classification" , trees = hardhat :: tune(" funky name \n " )) %> %
0 commit comments