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
{{ message }}
Repository navigation
Test failures in astropy.coordinates and astropy.utils when running tests twice #4444
When running tests using astropy.test() twice in a row, the following errors appear the second time around:
________________________________________________________________________________________________________________ test_distances_scipy _________________________________________________________________________________________________________________
@pytest.mark.skipif(str('not HAS_SCIPY'))
def test_distances_scipy():
"""
The distance-related tests that require scipy due to the cosmology
module needing scipy integration routines
"""
from ...cosmology import WMAP5
#try different ways to initialize a Distance
d4 = Distance(z=0.23) # uses default cosmology - as of writing, WMAP7
> npt.assert_allclose(d4.z, 0.23, rtol=1e-8)
E AssertionError:
E Not equal to tolerance rtol=1e-08, atol=0
E
E (mismatch 100.0%)
E x: array(0.23000000254781977)
E y: array(0.23)
miniconda3/envs/production/lib/python3.4/site-packages/astropy-1.1.dev14272-py3.4-macosx-10.5-x86_64.egg/astropy/coordinates/tests/test_distance.py:123: AssertionError
_____________________________________________________________________________________________________________________ test_alias ______________________________________________________________________________________________________________________
def test_alias():
from ...cosmology import core, WMAP9, WMAP7
# REMOVE in astropy 0.5
with catch_warnings() as w:
x = core.DEFAULT_COSMOLOGY()
> assert x == WMAP9
E assert FlatLambdaCDM(name="WMAP7", H0=70.4 km / (Mpc s), Om0=0.272, Tcmb0=2.725 K, Neff=3.04, m_nu=[ 0. 0. 0.] eV, Ob0=0.0455) == FlatLambdaCDM(name="WMAP9", H0=69.3 km / (Mpc s), Om0=0.286, Tcmb0=2.725 K, Neff=3.04, m_nu=[ 0. 0. 0.] eV, Ob0=0.0463)
miniconda3/envs/production/lib/python3.4/site-packages/astropy-1.1.dev14272-py3.4-macosx-10.5-x86_64.egg/astropy/utils/tests/test_state.py:16: AssertionError
I'm investigating this as part of #4349 but opened this issue in case I run out of time to work on these.
Activity
bsipocz commentedon Jun 28, 2017
Has a similar issue in #5082, but retesting now with 2.0rc1, it doesn't show up again. Closing I didn't see these, either.
Feel free to reopen if you run into it again.