2121@pytest .mark .remote_data
2222class TestSimbad :
2323
24- @classmethod
25- def setup_class (cls ):
26- Simbad .ROW_LIMIT = 5
27-
2824 @pytest .fixture ()
2925 def temp_dir (self , request ):
3026 my_temp_dir = tempfile .mkdtemp ()
@@ -71,14 +67,16 @@ def test_query_bibcode(self, temp_dir):
7167 def test_query_bibobj_async (self , temp_dir ):
7268 simbad = Simbad ()
7369 simbad .cache_location = temp_dir
74- response = simbad .query_bibobj_async ('2005A&A.430.165F ' )
70+ response = simbad .query_bibobj_async ('2006AJ....131.1163S ' )
7571 assert response is not None
7672
7773 def test_query_bibobj (self , temp_dir ):
7874 simbad = Simbad ()
75+ simbad .ROW_LIMIT = 5
7976 simbad .cache_location = temp_dir
8077 result = simbad .query_bibobj ('2005A&A.430.165F' )
8178 assert isinstance (result , Table )
79+ assert len (result ) == 5
8280
8381 def test_query_catalog_async (self , temp_dir ):
8482 simbad = Simbad ()
@@ -94,23 +92,26 @@ def test_query_catalog(self, temp_dir):
9492
9593 def test_query_region_async (self , temp_dir ):
9694 simbad = Simbad ()
95+ # TODO: rewise once ROW_LIMIT is working
96+ simbad .TIMEOUT = 100
9797 simbad .cache_location = temp_dir
9898 response = simbad .query_region_async (
99- ICRS_COORDS_M42 , radius = 5 * u .deg , equinox = 2000.0 , epoch = 'J2000' )
99+ ICRS_COORDS_M42 , radius = 2 * u .deg , equinox = 2000.0 , epoch = 'J2000' )
100100
101101 assert response is not None
102102
103103 def test_query_region_async_vector (self , temp_dir ):
104104 simbad = Simbad ()
105105 simbad .cache_location = temp_dir
106- response1 = simbad .query_region_async (multicoords ,
107- radius = 0.5 * u .arcsec )
106+ response1 = simbad .query_region_async (multicoords , radius = 0.5 * u .arcsec )
108107 assert response1 .request .body == 'script=votable+%7Bmain_id%2Ccoordinates%7D%0Avotable+open%0Aquery+coo+5%3A35%3A17.3+-80%3A52%3A00+radius%3D0.5s+frame%3DICRS+equi%3D2000.0%0Aquery+coo+17%3A47%3A20.4+-28%3A23%3A07.008+radius%3D0.5s+frame%3DICRS+equi%3D2000.0%0Avotable+close' # noqa
109108
110109 def test_query_region (self , temp_dir ):
111110 simbad = Simbad ()
111+ # TODO: rewise once ROW_LIMIT is working
112+ simbad .TIMEOUT = 100
112113 simbad .cache_location = temp_dir
113- result = simbad .query_region (ICRS_COORDS_M42 , radius = 5 * u .deg ,
114+ result = simbad .query_region (ICRS_COORDS_M42 , radius = 2 * u .deg ,
114115 equinox = 2000.0 , epoch = 'J2000' )
115116 assert isinstance (result , Table )
116117
0 commit comments