Test Gaia.query_object with `columns` and `radius`
Currently the `astroquery.gaia.core.GaiaClass.query_object()` method
ignores the `column` argument if `radius` is specified. This commit adds
a remote test that reveals the problem.
@@ -5,6 +5,15 @@ from astropy.coordinates import SkyCoord
from .. import GaiaClass
+@pytest.mark.remote_data
+def test_query_object_columns_with_radius():
+ # Regression test: `columns` were ignored if `radius` was provided [#2025]
+ Gaia = GaiaClass()
+ sc = SkyCoord(ra=0*u.deg, dec=0*u.deg)
+ table = Gaia.query_object_async(sc, radius=10*u.arcsec, columns=['ra'])
+ assert table.colnames == ['ra', 'dist']
+
+
@pytest.mark.remote_data
def test_query_object_row_limit():
Gaia = GaiaClass()
