From 3491d30b00fc61c85b11b4cf68c3b731abd26e21 Mon Sep 17 00:00:00 2001 From: Debian Science Team Date: Fri, 28 Jan 2022 19:22:53 +0000 Subject: [PATCH] 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 --- pandas/tests/window/moments/test_moments_rolling.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pandas/tests/window/moments/test_moments_rolling.py b/pandas/tests/window/moments/test_moments_rolling.py index b2e53a67..f6467ee8 100644 --- a/pandas/tests/window/moments/test_moments_rolling.py +++ b/pandas/tests/window/moments/test_moments_rolling.py @@ -1,3 +1,7 @@ +import sys +import platform +import re + import numpy as np import pytest @@ -585,7 +589,9 @@ def test_rolling_quantile_interpolation_options(quantile, interpolation, data): 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(): -- 2.30.2