-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[4.1RC2] test_timer failed on s390x #10847
Copy link
Copy link
Closed
Description
Description
After uploading a (mainly unchanged) release to Debian, our s390x build failed with the following test failure:
__________________________________ test_timer __________________________________
@pytest.mark.filterwarnings("ignore")
def test_timer():
"""Test function timer."""
from astropy.utils.timer import RunTimePredictor
p = RunTimePredictor(func_to_time)
# --- These must run before data points are introduced. ---
with pytest.raises(ValueError):
p.do_fit()
with pytest.raises(RuntimeError):
p.predict_time(100)
# --- These must run next to set up data points. ---
p.time_func([2.02, 2.04, 2.1, 'a', 2.3])
p.time_func(2.2) # Test OrderedDict
assert p._funcname == 'func_to_time'
assert p._cache_bad == ['a']
k = list(p.results.keys())
v = list(p.results.values())
np.testing.assert_array_equal(k, [2.02, 2.04, 2.1, 2.3, 2.2])
np.testing.assert_allclose(v, [0.1, 0.2, 0.5, 1.5, 1.0])
# --- These should only run once baseline is established. ---
with pytest.raises(ModelsError):
a = p.do_fit(model='foo')
with pytest.raises(ModelsError):
a = p.do_fit(fitter='foo')
a = p.do_fit()
assert p._power == 1
# Perfect slope is 5, with 10% uncertainty
> assert 4.5 <= a[1] <= 5.5
E assert 4.5 <= 3.2149869047170583
astropy/utils/tests/test_timer.py:75: AssertionError
Since the changes are far away from the test (#10765, skipping test_wcsapi_extension) I would guess this is due to some unreliable timings on the build machine, therefore not really problematic. I will just disable this one for the 4.2 build.
Expected behavior
The test is expected to succeed
Actual behavior
Test fails.
Steps to Reproduce
Probably this failure is rare and not simply to reproduce.
Reactions are currently unavailable