From: Debian Science Maintainers Date: Fri, 10 Jul 2020 05:46:36 +0000 (+0100) Subject: Don't require warnings that not all arches produce X-Git-Tag: archive/raspbian/0.11.1-3+rpi1^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fe048c7d5dd30438e2926b7f3d80bb5d6a62385a;p=statsmodels.git Don't require warnings that not all arches produce numpy 0/0 (in tvalues): armel doesn't scipy.stats NaN: Upstream already note i386 doesn't, we find ppc64el and s390x don't either Author: Rebecca N. Palmer Bug-Debian: https://bugs.debian.org/956882 Forwarded: no Gbp-Pq: Name dont_require_warnings.patch --- diff --git a/statsmodels/base/tests/test_generic_methods.py b/statsmodels/base/tests/test_generic_methods.py index cedc27e..7e7b24c 100644 --- a/statsmodels/base/tests/test_generic_methods.py +++ b/statsmodels/base/tests/test_generic_methods.py @@ -109,19 +109,11 @@ class CheckGenericMixin(object): assert_equal(res1.bse[drop_index], 0) # OSX has many slight failures on this test tol = 1e-8 if PLATFORM_OSX else 1e-10 - with pytest.warns(RuntimeWarning, match="invalid value encountered"): - # division by zero in bse - tvals1 = res1.tvalues[keep_index_p] + tvals1 = res1.tvalues[keep_index_p] assert_allclose(tvals1, res2.tvalues, rtol=tol, atol=tol) # See gh5993 - if PLATFORM_LINUX32 or SCIPY_GT_14: - pvals1 = res1.pvalues[keep_index_p] - else: - with pytest.warns(RuntimeWarning, - match="invalid value encountered"): - # passing NaN into scipy.stats functions - pvals1 = res1.pvalues[keep_index_p] + pvals1 = res1.pvalues[keep_index_p] assert_allclose(pvals1, res2.pvalues, rtol=tol, atol=tol) if hasattr(res1, 'resid'): @@ -259,19 +251,11 @@ class CheckGenericMixin(object): assert_allclose(res1.params[drop_index], 0, rtol=1e-10) assert_allclose(res1.bse[keep_index_p], res2.bse, rtol=1e-8) assert_allclose(res1.bse[drop_index], 0, rtol=1e-10) - with pytest.warns(RuntimeWarning, match="invalid value"): - # zero in bse, so division by zero warning - tvals1 = res1.tvalues[keep_index_p] + tvals1 = res1.tvalues[keep_index_p] assert_allclose(tvals1, res2.tvalues, rtol=5e-8) # See gh5993 - if PLATFORM_LINUX32 or SCIPY_GT_14: - pvals1 = res1.pvalues[keep_index_p] - else: - with pytest.warns(RuntimeWarning, - match="invalid value encountered"): - # passing NaN into scipy.stats functions - pvals1 = res1.pvalues[keep_index_p] + pvals1 = res1.pvalues[keep_index_p] assert_allclose(pvals1, res2.pvalues, rtol=1e-6, atol=1e-30) if hasattr(res1, 'resid'):