From: Debian Science Team Date: Sun, 16 Aug 2020 19:09:14 +0000 (+0100) Subject: Don't fail test for rounding difference on i386 X-Git-Tag: archive/raspbian/0.25.3+dfsg2-5+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0ad403d6ee311184da5e2a8cebb82e3689566155;p=pandas.git Don't fail test for rounding difference on i386 Author: Rebecca N. Palmer Bug-Debian: https://bugs.debian.org/968208 Forwarded: no Gbp-Pq: Name 968208_rounding.patch --- diff --git a/pandas/tests/window/test_moments.py b/pandas/tests/window/test_moments.py index d8608599..51fcac82 100644 --- a/pandas/tests/window/test_moments.py +++ b/pandas/tests/window/test_moments.py @@ -1,6 +1,9 @@ import copy from datetime import datetime import warnings +import sys +import platform +import re import numpy as np from numpy.random import randn @@ -606,7 +609,9 @@ class TestMoments(Base): if np.isnan(q1): assert np.isnan(q2) else: - assert q1 == q2 + assert np.abs(q1-q2)<1e-15 + if not (re.match('i.?86|x86',platform.uname()[4]) and sys.maxsize<2**33): + assert q1 == q2 def test_invalid_quantile_value(self): data = np.arange(5)