Skip to content

Commit 43f6cea

Browse files
authored
Merge pull request #60 from derb12/fix_flaky
TEST: Bump rtols to fix flaky tests
2 parents b1eaff0 + ba7798a commit 43f6cea

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_spline_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ def test_pspline_lam_extremes(data_fixture, diff_order, allow_lower, spline_degr
620620
# and both larger num_knots and larger diff_orders need larger lam for it to be a
621621
# polynomial, so have to reduce the relative tolerance; num_knots has a larger effect
622622
# than diff_order, so base the rtol on it
623-
rtol = {50: 5e-4, 501: 5e-3}[num_knots]
623+
rtol = {50: 1e-3, 501: 5e-3}[num_knots]
624624
assert_allclose(output, polynomial_fit, rtol=rtol, atol=1e-10)
625625

626626
# for lam ~ 0, should just approximate the an interpolating spline

tests/test_whittaker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def test_sparse_comparison(self, diff_order, eta):
324324
self.y, lam=lam, eta=eta, diff_order=diff_order, max_iter=max_iter, tol=tol
325325
)
326326

327-
assert_allclose(banded_output, sparse_output, rtol=1e-6, atol=1e-10)
327+
assert_allclose(banded_output, sparse_output, rtol=1.5e-6, atol=1e-10)
328328

329329

330330
class TestIArPLS(WhittakerTester):
@@ -445,7 +445,7 @@ def test_sparse_comparison(self, diff_order, asymmetric_coef):
445445
asymmetric_coef=asymmetric_coef
446446
)[0]
447447

448-
rtol = {2: 1e-4, 3: 2e-4}[diff_order]
448+
rtol = {2: 1.5e-4, 3: 3e-4}[diff_order]
449449
assert_allclose(banded_output, sparse_output, rtol=rtol, atol=1e-8)
450450

451451

0 commit comments

Comments
 (0)