@@ -938,7 +938,7 @@ def test_tesscut_download_cutouts_mt(self, tmpdir):
938
938
assert error_tica_mt in str (error_msg .value )
939
939
940
940
@pytest .mark .parametrize ("product" , ["tica" , "spoc" ])
941
- def test_tesscut_get_cutouts (self , product ):
941
+ def test_tesscut_get_cutouts (self , product , caplog ):
942
942
943
943
coord = SkyCoord (107.18696 , - 70.50919 , unit = "deg" )
944
944
@@ -964,6 +964,11 @@ def test_tesscut_get_cutouts(self, product):
964
964
assert len (cutout_hdus_list ) >= 1
965
965
assert isinstance (cutout_hdus_list [0 ], fits .HDUList )
966
966
967
+ # Check that an INFO message is returned when timeout is adjusted
968
+ mast .Tesscut .get_cutouts (product = product , coordinates = coord , size = 5 , timeout = 1000 )
969
+ with caplog .at_level ("INFO" , logger = "astroquery" ):
970
+ assert "timeout upper limit is being changed" in caplog .text
971
+
967
972
def test_tesscut_get_cutouts_mt (self ):
968
973
969
974
# Moving target functionality testing
@@ -1016,6 +1021,15 @@ def test_tesscut_get_cutouts_mt(self):
1016
1021
moving_target = True )
1017
1022
assert error_tica_mt in str (error_msg .value )
1018
1023
1024
+ @pytest .mark .xfail (raises = InputWarning )
1025
+ @pytest .mark .parametrize ("product" , ["tica" , "spoc" ])
1026
+ @pytest .mark .parametrize ("size" , [31 , 0.2 * u .deg , 5000 * u .arcsec , 20 * u .arcmin ])
1027
+ def test_tesscut_timeout_param (self , product , size ):
1028
+
1029
+ # Check that a warning comes up when cutout size too big
1030
+ coordinates = '60 60'
1031
+ mast .Tesscut .get_cutouts (product = product , coordinates = coordinates , size = size )
1032
+
1019
1033
###################
1020
1034
# ZcutClass tests #
1021
1035
###################
0 commit comments