From: Debian Science Maintainers Date: Sat, 4 Feb 2023 20:49:19 +0000 (+0000) Subject: Don't require times to match to the second X-Git-Tag: archive/raspbian/0.13.5+dfsg-6+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8e4d25dffdaf4c96f43ff039102505fc2abdcdcd;p=statsmodels.git Don't require times to match to the second Avoids random failures on slow buildds (twice seen on armhf) Author: Rebecca N. Palmer Forwarded: no Gbp-Pq: Name dont_match_seconds.patch --- diff --git a/statsmodels/regression/tests/test_regression.py b/statsmodels/regression/tests/test_regression.py index 3518149..1f5c923 100644 --- a/statsmodels/regression/tests/test_regression.py +++ b/statsmodels/regression/tests/test_regression.py @@ -5,6 +5,7 @@ Test functions for models.regression from statsmodels.compat.python import lrange import warnings +import re import numpy as np from numpy.testing import ( @@ -1618,5 +1619,7 @@ def test_slim_summary(reset_randomstate): summ = res.summary() summ2 = res.summary() slim_summ = res.summary(slim=True) - assert str(summ) == str(summ2) - assert str(slim_summ) != str(summ) + def strip_seconds(s): + return re.sub('(Time: +[0-9][0-9]:[0-9][0-9]:)([0-9][0-9])','\\1xx',str(s)) + assert strip_seconds(summ) == strip_seconds(summ2) + assert strip_seconds(slim_summ) != strip_seconds(summ)