Skip to content

Commit a93ea7c

Browse files
committed
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.
1 parent a31ab86 commit a93ea7c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

astroquery/gaia/tests/test_gaia_remote.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
from .. import GaiaClass
66

77

8+
@pytest.mark.remote_data
9+
def test_query_object_columns_with_radius():
10+
# Regression test: `columns` were ignored if `radius` was provided [#2025]
11+
Gaia = GaiaClass()
12+
sc = SkyCoord(ra=0*u.deg, dec=0*u.deg)
13+
table = Gaia.query_object_async(sc, radius=10*u.arcsec, columns=['ra'])
14+
assert table.colnames == ['ra', 'dist']
15+
16+
817
@pytest.mark.remote_data
918
def test_query_object_row_limit():
1019
Gaia = GaiaClass()

0 commit comments

Comments
 (0)