|
8 | 8 | @pytest.mark.remote_data
|
9 | 9 | def test_query_object_columns_with_radius():
|
10 | 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']) |
| 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 | 14 | assert table.colnames == ['ra', 'dist']
|
15 | 15 |
|
16 | 16 |
|
17 | 17 | @pytest.mark.remote_data
|
18 | 18 | def test_query_object_row_limit():
|
19 |
| - Gaia = GaiaClass() |
| 19 | + gaia = GaiaClass() |
20 | 20 | coord = SkyCoord(ra=280, dec=-60, unit=(u.degree, u.degree), frame='icrs')
|
21 | 21 | width = u.Quantity(0.1, u.deg)
|
22 | 22 | height = u.Quantity(0.1, u.deg)
|
23 |
| - r = Gaia.query_object_async(coordinate=coord, width=width, height=height) |
| 23 | + r = gaia.query_object_async(coordinate=coord, width=width, height=height) |
24 | 24 |
|
25 |
| - assert len(r) == Gaia.ROW_LIMIT |
| 25 | + assert len(r) == gaia.ROW_LIMIT |
26 | 26 |
|
27 |
| - Gaia.ROW_LIMIT = 10 |
28 |
| - r = Gaia.query_object_async(coordinate=coord, width=width, height=height) |
| 27 | + gaia.ROW_LIMIT = 10 |
| 28 | + r = gaia.query_object_async(coordinate=coord, width=width, height=height) |
29 | 29 |
|
30 |
| - assert len(r) == 10 == Gaia.ROW_LIMIT |
| 30 | + assert len(r) == 10 == gaia.ROW_LIMIT |
31 | 31 |
|
32 |
| - Gaia.ROW_LIMIT = -1 |
33 |
| - r = Gaia.query_object_async(coordinate=coord, width=width, height=height) |
| 32 | + gaia.ROW_LIMIT = -1 |
| 33 | + r = gaia.query_object_async(coordinate=coord, width=width, height=height) |
34 | 34 |
|
35 | 35 | assert len(r) == 184
|
36 | 36 |
|
37 | 37 |
|
38 | 38 | @pytest.mark.remote_data
|
39 | 39 | def test_cone_search_row_limit():
|
40 |
| - Gaia = GaiaClass() |
| 40 | + gaia = GaiaClass() |
41 | 41 | coord = SkyCoord(ra=280, dec=-60, unit=(u.degree, u.degree), frame='icrs')
|
42 | 42 | radius = u.Quantity(0.1, u.deg)
|
43 |
| - j = Gaia.cone_search_async(coord, radius=radius) |
| 43 | + j = gaia.cone_search_async(coord, radius=radius) |
44 | 44 | r = j.get_results()
|
45 | 45 |
|
46 |
| - assert len(r) == Gaia.ROW_LIMIT |
| 46 | + assert len(r) == gaia.ROW_LIMIT |
47 | 47 |
|
48 |
| - Gaia.ROW_LIMIT = 10 |
49 |
| - j = Gaia.cone_search_async(coord, radius=radius) |
| 48 | + gaia.ROW_LIMIT = 10 |
| 49 | + j = gaia.cone_search_async(coord, radius=radius) |
50 | 50 | r = j.get_results()
|
51 | 51 |
|
52 |
| - assert len(r) == 10 == Gaia.ROW_LIMIT |
| 52 | + assert len(r) == 10 == gaia.ROW_LIMIT |
53 | 53 |
|
54 |
| - Gaia.ROW_LIMIT = -1 |
55 |
| - j = Gaia.cone_search_async(coord, radius=radius) |
| 54 | + gaia.ROW_LIMIT = -1 |
| 55 | + j = gaia.cone_search_async(coord, radius=radius) |
56 | 56 | r = j.get_results()
|
57 | 57 |
|
58 | 58 | assert len(r) == 1218
|
0 commit comments