diff --git a/astroquery/eso/tests/test_eso.py b/astroquery/eso/tests/test_eso.py index 7f25b65d8f..a6323bb751 100644 --- a/astroquery/eso/tests/test_eso.py +++ b/astroquery/eso/tests/test_eso.py @@ -232,18 +232,18 @@ def test_py2adql(): q = py2adql('pinko.Pallino', ['pippo', 'tizio', 'caio'], where_constraints=['asdf > 1', 'asdf < 2', 'asdf = 3', 'asdf != 4'], - intersects=(1, 2, 3, 4), order_by='order_col') + order_by='order_col') eq = "select pippo, tizio, caio from pinko.Pallino " + \ - "where asdf > 1 and asdf < 2 and asdf = 3 and asdf != 4 and " + \ - "intersects(1, circle('ICRS', 2, 3, 4))=1 order by order_col desc" # JM check here!! + "where asdf > 1 and asdf < 2 and asdf = 3 and asdf != 4 " + \ + "order by order_col desc" # JM check here!! assert eq == q, f"Expected:\n{eq}\n\nObtained:\n{q}\n\n" q = py2adql('pinko.Pallino', ['pippo', 'tizio', 'caio'], where_constraints=["asdf = 'ASDF'", "bcd = 'BCD'"], - intersects=(1, 2, 3, 4), order_by='order_col') + order_by='order_col') eq = "select pippo, tizio, caio from pinko.Pallino " + \ - "where asdf = 'ASDF' and bcd = 'BCD' and " + \ - "intersects(1, circle('ICRS', 2, 3, 4))=1 order by order_col desc" # JM check here!! + "where asdf = 'ASDF' and bcd = 'BCD' " + \ + "order by order_col desc" # JM check here!! assert eq == q, f"Expected:\n{eq}\n\nObtained:\n{q}\n\n" # All arguments @@ -252,21 +252,20 @@ def test_py2adql(): 'proposal_id, obs_collection' table = 'ivoa.ObsCore' and_c_list = ['em_min>4.0e-7', 'em_max<1.2e-6', 'asdasdads'] - intersects_tuple = ("s_region", 109.668246, -24.5587, 0.001389) q = py2adql(columns=columns, table=table, - where_constraints=and_c_list, intersects=intersects_tuple, + where_constraints=and_c_list, order_by='snr', order_by_desc=True) expected_query = 'select ' + columns + ' from ' + table + \ ' where ' + and_c_list[0] + ' and ' + and_c_list[1] + ' and ' + and_c_list[2] + \ - ' and ' + "intersects(s_region, circle('ICRS', 109.668246, -24.5587, 0.001389))=1 order by snr desc" + " order by snr desc" assert expected_query == q, f"Expected:\n{expected_query}\n\nObtained:\n{q}\n\n" # All arguments q = py2adql(columns=columns, table=table, - where_constraints=and_c_list, intersects=intersects_tuple, + where_constraints=and_c_list, order_by='snr', order_by_desc=False) expected_query = 'select ' + columns + ' from ' + table + \ ' where ' + and_c_list[0] + ' and ' + and_c_list[1] + ' and ' + and_c_list[2] + \ - ' and ' + "intersects(s_region, circle('ICRS', 109.668246, -24.5587, 0.001389))=1 order by snr asc" + " order by snr asc" assert expected_query == q, f"Expected:\n{expected_query}\n\nObtained:\n{q}\n\n"