GeezerVison is showing github.com — Merge pull request #18281 from pllim/rm-funcky-test · astropy/astropy@75a1ca7
File tree
Expand file treeCollapse file tree
Open diff view settings
astropy/cosmology/_src/tests/funcs
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: astropy/cosmology/_src/tests/funcs/test_funcs.py -19Lines changed: 0 additions & 19 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
29 | 29 | wpwaCDM, |
30 | 30 | z_at_value, |
31 | 31 | ) |
32 | | -from astropy.cosmology._src.funcs.optimize import _z_at_scalar_value |
33 | 32 | from astropy.units import allclose |
34 | | -from astropy.utils.compat import NUMPY_LT_2_3 |
35 | 33 | from astropy.utils.compat.optional_deps import HAS_SCIPY |
36 | 34 | from astropy.utils.exceptions import AstropyUserWarning |
37 | 35 |
|
@@ -173,23 +171,6 @@ def test_scalar_input_to_output(self): |
173 | 171 | assert z.shape == () |
174 | 172 |
|
175 | 173 |
|
176 | | -@pytest.mark.skipif(not HAS_SCIPY, reason="test requires scipy") |
177 | | -@pytest.mark.xfail( |
178 | | - not NUMPY_LT_2_3, reason="TODO fix: https://github.com/astropy/astropy/issues/18045" |
179 | | -) |
180 | | -def test_z_at_value_numpyvectorize(): |
181 | | - """Test that numpy vectorize fails on Quantities. |
182 | | -
|
183 | | - If this test starts failing then numpy vectorize can be used instead of |
184 | | - the home-brewed vectorization. Please submit a PR making the change. |
185 | | - """ |
186 | | - z_at_value = np.vectorize( |
187 | | - _z_at_scalar_value, excluded=["func", "method", "verbose"] |
188 | | - ) |
189 | | - with pytest.raises(u.UnitConversionError, match="dimensionless quantities"): |
190 | | - z_at_value(Planck15.age, 10 * u.Gyr) |
191 | | - |
192 | | - |
193 | 174 | @pytest.mark.skipif(not HAS_SCIPY, reason="test requires scipy") |
194 | 175 | def test_z_at_value_verbose(monkeypatch): |
195 | 176 | cosmo = Planck13 |
|