diff --git a/DESCRIPTION b/DESCRIPTION index 1da935c42..55ed6b449 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -62,7 +62,7 @@ Suggests: rmarkdown, rstanarm, see, - testthat (>= 3.1.6), + testthat (>= 3.2.0), tibble, tidyr, withr diff --git a/tests/testthat/_snaps/contr.deviation.md b/tests/testthat/_snaps/contr.deviation.md new file mode 100644 index 000000000..7b3436578 --- /dev/null +++ b/tests/testthat/_snaps/contr.deviation.md @@ -0,0 +1,23 @@ +# contr.deviation | snapshot + + Code + solve(c.deviation) + Output + 4 6 8 + Intercept 0.3333333 0.3333333 0.3333333 + 6 -1.0000000 1.0000000 0.0000000 + 8 -1.0000000 0.0000000 1.0000000 + +--- + + Code + solve(mm) + Output + cyl4.am0 cyl4.am1 cyl6.am0 cyl6.am1 cyl8.am0 cyl8.am1 + (Intercept) 0.3333333 0.0000000 0.3333333 0.0000000 0.3333333 0.0000000 + cyl6 -1.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 + cyl8 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 + am1 -0.3333333 0.3333333 -0.3333333 0.3333333 -0.3333333 0.3333333 + cyl6:am1 1.0000000 -1.0000000 -1.0000000 1.0000000 0.0000000 0.0000000 + cyl8:am1 1.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 1.0000000 + diff --git a/tests/testthat/_snaps/data_rescale.md b/tests/testthat/_snaps/data_rescale.md index 4091116e3..e02d7eb14 100644 --- a/tests/testthat/_snaps/data_rescale.md +++ b/tests/testthat/_snaps/data_rescale.md @@ -2,7 +2,7 @@ Code head(rescale(iris, to = c(0, 1))) - Message + Message Variables of class `factor` can't be rescaled and remain unchanged. Output Sepal.Length Sepal.Width Petal.Length Petal.Width Species @@ -30,7 +30,7 @@ Code head(rescale(iris, to = list(Sepal.Length = c(0, 1), Petal.Length = c(-1, 0)))) - Message + Message Variables of class `factor` can't be rescaled and remain unchanged. Output Sepal.Length Sepal.Width Petal.Length Petal.Width Species diff --git a/tests/testthat/_snaps/data_separate.md b/tests/testthat/_snaps/data_separate.md index e46ee77c2..c3176c7b3 100644 --- a/tests/testthat/_snaps/data_separate.md +++ b/tests/testthat/_snaps/data_separate.md @@ -123,7 +123,7 @@ Code data_separate(d_sep, guess_columns = "mode", select = NULL) - Message + Message Column `x` had different number of values after splitting. Variable was split into 3 columns. `x` returned more columns than expected after splitting. Right-most diff --git a/tests/testthat/test-data_read.R b/tests/testthat/test-data_read.R index b73a16052..fd4884deb 100644 --- a/tests/testthat/test-data_read.R +++ b/tests/testthat/test-data_read.R @@ -1,6 +1,3 @@ -skip_on_cran() -skip_if_offline() - skip_if_not_installed("httr") skip_if_not_installed("readxl") skip_if_not_installed("haven") @@ -8,6 +5,11 @@ skip_if_not_installed("readr") skip_if_not_installed("data.table") skip_if_not_installed("rio") +skip_on_cran() + +skip_if_not_installed("curl") +skip_if_offline() + # csv ------------------------- test_that("data_read - csv", { diff --git a/tests/testthat/test-data_to_factor.R b/tests/testthat/test-data_to_factor.R index 45859d724..ee8a46c3e 100644 --- a/tests/testthat/test-data_to_factor.R +++ b/tests/testthat/test-data_to_factor.R @@ -82,12 +82,14 @@ test_that("to_factor regex", { # SPSS file, many value labels ----------------------------------- -skip_on_cran() -skip_if_offline() - skip_if_not_installed("httr") skip_if_not_installed("haven") +skip_on_cran() + +skip_if_not_installed("curl") +skip_if_offline() + # Output validated against SPSS output from original dataset test_that("data_read, convert many labels correctly", { diff --git a/tests/testthat/test-data_write.R b/tests/testthat/test-data_write.R index 66bd0c296..5e9db3ccb 100644 --- a/tests/testthat/test-data_write.R +++ b/tests/testthat/test-data_write.R @@ -1,10 +1,12 @@ -skip_on_cran() -skip_if_offline() - skip_if_not_installed("httr") skip_if_not_installed("haven") skip_if_not_installed("readr") +skip_on_cran() + +skip_if_not_installed("curl") +skip_if_offline() + # prepare data set --------------- data(efc)