From: Debian Science Team Date: Wed, 26 Aug 2020 21:34:50 +0000 (+0100) Subject: Don't fail test for rounding difference on i386 X-Git-Tag: archive/raspbian/1.0.5+dfsg-3+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d212de6f8f48a7fa08696fe544114b23d9065faa;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/moments/test_moments_rolling.py b/pandas/tests/window/moments/test_moments_rolling.py index 83e4ee25..7df33077 100644 --- a/pandas/tests/window/moments/test_moments_rolling.py +++ b/pandas/tests/window/moments/test_moments_rolling.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 @@ -637,7 +640,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)