From f1fd5070ff2a7a3c7bd1d0717369b0ebfcfba7dd Mon Sep 17 00:00:00 2001 From: SaguaroDev <229527014+SaguaroDev@users.noreply.github.com> Date: Thu, 7 May 2026 14:13:25 -0400 Subject: [PATCH] fix(tests): use assert in test_n_periods so failures actually fail The test ended with `return xp.all(...)`, which silently discards the boolean result. Pytest 9 also emits PytestReturnNotNoneWarning. Replacing `return` with `assert` makes the test enforce the expected LDFs and clears the warning. Closes #743 --- chainladder/development/tests/test_development.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chainladder/development/tests/test_development.py b/chainladder/development/tests/test_development.py index 54086cce..ce33b892 100644 --- a/chainladder/development/tests/test_development.py +++ b/chainladder/development/tests/test_development.py @@ -40,7 +40,7 @@ def test_drop2(raa): def test_n_periods(): d = cl.load_sample("usauto")["incurred"] xp = np if d.array_backend == "sparse" else d.get_array_module() - return xp.all( + assert xp.all( xp.around( xp.unique( cl.Development(n_periods=3, average="volume").fit(d).ldf_.values,