From 59750fd0438ccaa5c6612990660181210f8594f2 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 31 Oct 2019 02:20:56 +0100 Subject: Increase numeric tolerance of three tests for Travis --- tests/testthat/test_tests.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/testthat/test_tests.R') diff --git a/tests/testthat/test_tests.R b/tests/testthat/test_tests.R index 523edc4a..d8b97815 100644 --- a/tests/testthat/test_tests.R +++ b/tests/testthat/test_tests.R @@ -5,7 +5,7 @@ test_that("The likelihood ratio test works", { expect_error(lrtest(fit_tc_1, f_tc_2), "not been fitted to the same data") res <- lrtest(fit_nw_1, fit_tc_1) - expect_equal(res[["2", "Pr(>Chisq)"]], 0.9999998) + expect_equal(res[["2", "Pr(>Chisq)"]], 1, tolerance = 1e-5) }) @@ -23,5 +23,5 @@ test_that("Updating fitted models works", { test_nw_tc <- lrtest(f_soil_1_nw, f_soil_1_tc) expect_equivalent(test_nw_tc[["2", "Pr(>Chisq)"]], 2.113e-6) test_nw_A2 <- lrtest(f_soil_1_nw, f_soil_1_nw_A2) - expect_equivalent(test_nw_A2[["2", "Pr(>Chisq)"]], 0.9999468) + expect_equivalent(test_nw_A2[["2", "Pr(>Chisq)"]], 1, tolerance = 1e-4) }) -- cgit v1.2.1