From 6b777c7439826254d3a2834a2026039c960d7733 Mon Sep 17 00:00:00 2001 From: jpquast Date: Sat, 2 Nov 2024 21:36:40 +0100 Subject: [PATCH] Fix tests again --- tests/testthat/test-workflow.R | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-workflow.R b/tests/testthat/test-workflow.R index de1ea64..f29f198 100644 --- a/tests/testthat/test-workflow.R +++ b/tests/testthat/test-workflow.R @@ -331,7 +331,7 @@ test_that("calculate_diff_abundance works", { if (packageVersion("limma") >= "3.61.8") { expect_equal(round(min(diff_moderated$adj_pval, na.rm = TRUE), digits = 9), 3.87e-05) } else { - expect_equal(round(min(diff_moderated$adj_pval, na.rm = TRUE), digits = 9), 5.76e-05) + expect_equal(round(min(diff_moderated$adj_pval, na.rm = TRUE), digits = 9), 5.7616e-05) } } }) @@ -494,8 +494,13 @@ if (Sys.getenv("TEST_PROTTI") == "true") { expect_equal(ncol(diff_moderated_deprecated), 13) expect_equal(ncol(diff_proDA_deprecated), 12) expect_equal(round(min(diff_mean_sd_deprecated$adj_pval, na.rm = TRUE), digits = 9), 0.00758761) - expect_equal(round(min(diff_moderated_deprecated$adj_pval, na.rm = TRUE), digits = 9), 3.87e-05) expect_equal(round(min(diff_proDA_deprecated$adj_pval, na.rm = TRUE), digits = 5), 0.00125) + + if (packageVersion("limma") >= "3.61.8") { + expect_equal(round(min(diff_moderated_deprecated$adj_pval, na.rm = TRUE), digits = 9), 3.87e-05) + } else { + expect_equal(round(min(diff_moderated_deprecated$adj_pval, na.rm = TRUE), digits = 9), 5.7616e-05) + } }) }