Skip to content

Commit

Permalink
remove skips
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 27, 2024
1 parent 2f2e4be commit 3706f53
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 45 deletions.
1 change: 0 additions & 1 deletion tests/testthat/test-cgam.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
skip_if_not_installed("cgam")
skip_if_not(getRversion() >= "4.0.0")

data(cubic, package = "cgam")
incr.conv <- cgam::incr.conv
Expand Down
25 changes: 0 additions & 25 deletions tests/testthat/test-emmeans.R
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
## These tests fail on current R-devel (win-builder), not sure why

# * using R Under development (unstable) (2023-03-14 r83979 ucrt)
# * using platform: x86_64-w64-mingw32 (64-bit)
# * R was compiled by
# gcc.exe (GCC) 12.2.0
# GNU Fortran (GCC) 12.2.0
# * running under: Windows Server 2022 x64 (build 20348)

# ── Failure ('test-emmeans.R:14:5'): emmeans ────────────────────────────────────
# get_statistic(EList)$Statistic (`actual`) not equal to c(1.449, -0.377, -2.346, 1.243, 2.717, 1.393) (`expected`).

# `actual`: 1.2429 2.7166 1.3925 1.2429 2.7166 1.3925
# `expected`: 1.4490 -0.3770 -2.3460 1.2430 2.7170 1.3930
# ── Failure ('test-emmeans.R:15:5'): emmeans ────────────────────────────────────
# get_statistic(EList)$Statistic[1:3] (`actual`) not equal to get_statistic(E)$Statistic (`expected`).

# `actual`: 1.2 2.7 1.4
# `expected`: 1.4 -0.4 -2.3

# [ FAIL 2 | WARN 0 | SKIP 25 | PASS 3366 ]

skip_if(getRversion() > "4.2.2")
skip_if_not_installed("emmeans")

test_that("emmeans", {
Expand All @@ -29,9 +6,7 @@ test_that("emmeans", {
)

EList <- emmeans::emmeans(m, pairwise ~ cyl, type = "resp")

E <- emmeans::emmeans(m, ~cyl, type = "resp")

C <- emmeans::contrast(E, method = "pairwise")

expect_identical(find_statistic(EList), "z-statistic")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ test_that("workaround bug in estimatr", {

test_that("get_data colnames", {
skip_on_os("windows")
skip_if_not(getRversion() >= "4.0.0")
skip_if_not_installed("brms")
m <- suppressMessages(suppressWarnings(brms::brm(mpg ~ hp + mo(cyl), data = mtcars, refresh = 0, iter = 200, chains = 1)))
out <- get_data(m)
Expand Down
3 changes: 0 additions & 3 deletions tests/testthat/test-get_datagrid.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
skip_if_not(getRversion() >= "4.0.0")

m1 <- lm(hp ~ ordered(cyl), data = mtcars)
m2 <- lm(hp ~ as.ordered(cyl), data = mtcars)
m3 <- lm(hp ~ as.factor(cyl), data = mtcars)
Expand Down Expand Up @@ -155,7 +153,6 @@ test_that("get_datagrid - models", {
"Some package uses `formula.tools::as.character.formula()` which breaks `find_formula()`."
)

skip_if(getRversion() > "4.3.3")
skip_if_not_installed("gamm4")
skip_if_not_installed("glmmTMB")
skip_if_not_installed("mgcv")
Expand Down
4 changes: 0 additions & 4 deletions tests/testthat/test-get_predicted.R
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ test_that("MASS::rlm", {
# =========================================================================

test_that("get_predicted - lmerMod", {
skip_if(getRversion() > "4.3.3")
suppressWarnings(skip_if_not_installed("glmmTMB"))
skip_if_not_installed("lme4")
skip_if_not_installed("merTools")
Expand Down Expand Up @@ -289,7 +288,6 @@ test_that("get_predicted - lmerMod (log)", {


test_that("get_predicted - merMod", {
skip_if(getRversion() > "4.3.3")
skip_if_not_installed("lme4")
skip_if_not_installed("glmmTMB")
x <- lme4::glmer(vs ~ am + (1 | cyl), data = mtcars, family = "binomial")
Expand All @@ -312,7 +310,6 @@ test_that("get_predicted - merMod", {


test_that("get_predicted - glmmTMB", {
skip_if(getRversion() > "4.3.3")
skip_if_not_installed("glmmTMB")
x <- glmmTMB::glmmTMB(mpg ~ am + (1 | cyl), data = mtcars)

Expand Down Expand Up @@ -630,7 +627,6 @@ test_that("brms: `type` in ellipsis used to produce the wrong intervals", {


test_that("zero-inflation stuff works", {
skip_if(getRversion() > "4.3.3")
skip_if_not_installed("glmmTMB")
skip_if_not_installed("pscl")

Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-get_variance.R
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ test_that("random effects CIs, poly slope", {
})

test_that("fixed effects variance for rank-deficient models, #765", {
skip_if(getRversion() > "4.3.3")
skip_if_not_installed("glmmTMB", minimum_version = "1.1.8")
set.seed(101)
dd <- data.frame(
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-glmmTMB.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
skip_on_os("mac") # error: FreeADFunObject
skip_if_not(getRversion() >= "4.0.0")
skip_if_not_installed("TMB")
skip_if_not_installed("glmmTMB")

Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-htest.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ test_that("model_info.t-test", {

# One sample
test_that("get_data.t-test, one-sample", {
skip_if(getRversion() < "4.0.0")
tt1 <- t.test(mtcars$mpg)
tt2 <- t.test(mtcars$mpg ~ 1)
expect_equal(
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-is_converged.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
skip_if_not_installed("lme4")
skip_if_not(getRversion() >= "4.0.0")

data(cbpp, package = "lme4")
data(sleepstudy, package = "lme4")
Expand Down Expand Up @@ -27,7 +26,6 @@ test_that("is_converged", {

skip_on_os("mac") # error: FreeADFunObject
skip_on_cran() ## FIXME: check with win-devel
skip_if(getRversion() > "4.3.3")
skip_if_not_installed("glmmTMB")
skip_if_not_installed("TMB")

Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-mlogit.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ test_that("find_response", {
})

test_that("get_response", {
skip_if_not(getRversion() >= "3.6.0")
expect_identical(get_response(m1), as.vector(Fish$mode))
})

test_that("get_data", {
skip_if_not(getRversion() >= "3.6.0")
expect_identical(nrow(get_data(m1, verbose = FALSE)), 4728L)
expect_identical(nrow(get_data(m2, verbose = FALSE)), 4728L)

Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-mmrm.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
skip_if_not_installed("mmrm")
skip_if(getRversion() < "4.0.0")

# see https://github.com/georgheinze/logistf/pull/54
skip_if(
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-model_data.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
skip_if_not_installed("splines")
skip_if_not_installed("TMB")
skip_if_not_installed("glmmTMB")
skip_if_not(getRversion() >= "4.0.0")

m1 <- lm(Sepal.Length ~ Species + splines::ns(Petal.Width), data = iris)
m2 <- lm(Sepal.Length ~ Species + splines::ns(Petal.Width, knots = 2), data = iris)
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-null_model.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
skip_if_not_installed("glmmTMB")
skip_if_not_installed("lme4")
skip_if_not_installed("TMB")
skip_if_not(getRversion() >= "4.0.0")


test_that("null_model with offset", {
m1 <- suppressWarnings(lme4::glmer.nb(mpg ~ disp + (1 | cyl) + offset(log(wt)), data = mtcars))
Expand Down

0 comments on commit 3706f53

Please sign in to comment.