Skip to content

Commit a3ef9bc

Browse files
committed
Add tests
1 parent 9fb86d4 commit a3ef9bc

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/testthat/test_logistic_reg.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,13 @@ test_that('liblinear execution', {
448448
)
449449
)
450450

451+
expect_error(
452+
tidy_res <- tidy(res),
453+
NA
454+
)
455+
expect_s3_class(tidy_res, "tbl_df")
456+
expect_equal(colnames(tidy_res), c("term", "estimate"))
457+
451458
# wrong outcome type
452459
expect_error(
453460
glm_form_catch <- fit(

tests/testthat/test_svm_linear.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ test_that('linear svm regression: LiblineaR', {
143143
expect_equal(multi_predict_args(res), NA_character_)
144144
expect_output(print(res), "parsnip model object")
145145

146+
expect_error(
147+
tidy_res <- tidy(res),
148+
NA
149+
)
150+
expect_s3_class(tidy_res, "tbl_df")
151+
expect_equal(colnames(tidy_res), c("term", "estimate"))
152+
146153
expect_error(
147154
fit(
148155
reg_mod,

0 commit comments

Comments
 (0)