You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Don't worry about it. I moved timer to astroquery anyway. Just sitting out the deprecation period before removing it altogether. You can safely ignore this failure. See #9050 and #10281
I personally would keep it open and close it with the final removal of timer (and so have it ready when someone falls into the same problem), but this is a matter of taste -- it is probably easy to forget forever if it is kept open now.
@pllim - is there a particular release when timer is removed? Perhaps we can just milestone this one with that release. Beyond the benefit mentioned by @olebole of allowing this to be found, a bonus one will be that it will remind us to do the actual deprecation...
Activity
pllim commentedon Oct 13, 2020
Don't worry about it. I moved
timertoastroqueryanyway. Just sitting out the deprecation period before removing it altogether. You can safely ignore this failure. See #9050 and #10281olebole commentedon Oct 13, 2020
I personally would keep it open and close it with the final removal of
timer(and so have it ready when someone falls into the same problem), but this is a matter of taste -- it is probably easy to forget forever if it is kept open now.mhvk commentedon Oct 13, 2020
@pllim - is there a particular release when
timeris removed? Perhaps we can just milestone this one with that release. Beyond the benefit mentioned by @olebole of allowing this to be found, a bonus one will be that it will remind us to do the actual deprecation...pllim commentedon Oct 13, 2020
Removal has a PR at #10281 but I don't think we reached a consensus on the milestone.