summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorNuno Teixeira <eduardo@FreeBSD.org>2026-03-08 01:18:22 +0000
committerNuno Teixeira <eduardo@FreeBSD.org>2026-03-08 01:19:19 +0000
commitb4d7ad856dbaf62d22fa5453147b1b89165857e2 (patch)
treed0dbaec7be8ab1815b71c47d26c01cf1c83c5110 /math
parentdevel/ghpr: update to v2 (diff)
math/R-cran-lme4: Fix tests
Apply upstream patch to fix tests.
Diffstat (limited to 'math')
-rw-r--r--math/R-cran-lme4/Makefile2
-rw-r--r--math/R-cran-lme4/files/patch-fix-test31
2 files changed, 31 insertions, 2 deletions
diff --git a/math/R-cran-lme4/Makefile b/math/R-cran-lme4/Makefile
index 13bcebf776ac..5c06cbc5d011 100644
--- a/math/R-cran-lme4/Makefile
+++ b/math/R-cran-lme4/Makefile
@@ -26,8 +26,6 @@ TEST_DEPENDS= R-cran-ggplot2>0:graphics/R-cran-ggplot2 \
USES= cran:auto-plist,compiles
-TESTING_UNSAFE= https://github.com/lme4/lme4/issues/942
-
pre-test:
# Test depends not ported yet
diff --git a/math/R-cran-lme4/files/patch-fix-test b/math/R-cran-lme4/files/patch-fix-test
new file mode 100644
index 000000000000..1d1baacb55b1
--- /dev/null
+++ b/math/R-cran-lme4/files/patch-fix-test
@@ -0,0 +1,31 @@
+From f1888c31db92f03c93d1bf05ecca1ac8a43c0935 Mon Sep 17 00:00:00 2001
+From: Ben Bolker <bbolker@gmail.com>
+Date: Sat, 7 Mar 2026 10:59:42 -0500
+Subject: [PATCH] loosen tolerance in isSingular test [run ci]
+
+---
+ tests/testthat/test-isSingular.R | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git tests/testthat/test-isSingular.R tests/testthat/test-isSingular.R
+index 33d47579..7d41562a 100644
+--- tests/testthat/test-isSingular.R
++++ tests/testthat/test-isSingular.R
+@@ -21,7 +21,7 @@ test_that("checking singular fit for covariance", {
+
+ test.reCovs <- c(test.us, test.diag, test.cs, test.homcs, test.ar1, test.hetar1)
+
+- ## tests should fail once one of the diagional entries is 0
++ ## tests should fail once one of the diagonal entries is 0
+ sapply(test.reCovs, function(i){
+ new_theta <- getTheta(i)
+ new_theta[1] <- 0
+@@ -74,7 +74,7 @@ test_that("checking singular fit for merMod", {
+ sigma = 2))[[1]]
+ mod2 <- suppressWarnings(lmer(form2, data = dat))
+ ## second one, should be an issue with group 1 as we set thetas = 0
+- expect_equal(isSingular(mod2), TRUE)
++ expect_equal(isSingular(mod2, tol = 5e-4), TRUE)
+
+ ## also need to consider the glmer case
+ form <- y ~ 1 + (1 + x1 | group1) + (1 + x2 | group2)