From da97b35c03e2c99c06d8ca0a147d3ff4416811a8 Mon Sep 17 00:00:00 2001 From: Debian Science Maintainers Date: Sat, 5 Oct 2024 11:43:25 +0100 Subject: [PATCH] Ignore missing HessianInversionWarning on some mips* Author: Rebecca N. Palmer Forwarded: no Gbp-Pq: Name mips_ignore_nonwarning.patch --- statsmodels/base/tests/test_generic_methods.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/statsmodels/base/tests/test_generic_methods.py b/statsmodels/base/tests/test_generic_methods.py index 24e337b..a7cfb13 100644 --- a/statsmodels/base/tests/test_generic_methods.py +++ b/statsmodels/base/tests/test_generic_methods.py @@ -9,6 +9,8 @@ Created on Wed Oct 30 14:01:27 2013 Author: Josef Perktold """ +import platform +import contextlib from statsmodels.compat.pytest import pytest_warns from statsmodels.compat.pandas import assert_index_equal, assert_series_equal from statsmodels.compat.platform import ( @@ -232,7 +234,7 @@ class CheckGenericMixin: start_params=sp, method=method, disp=0) else: - with pytest_warns(warn_cls): + with (contextlib.nullcontext() if ((warn_cls is not None) and ('mips' in platform.uname()[4])) else pytest_warns(warn_cls)): # more special casing RLM if (isinstance(self.results.model, (sm.RLM))): res1 = mod._fit_collinear() -- 2.30.2