@@ -938,7 +938,7 @@ def test_tesscut_download_cutouts_mt(self, tmpdir):
938938 assert error_tica_mt in str (error_msg .value )
939939
940940 @pytest .mark .parametrize ("product" , ["tica" , "spoc" ])
941- def test_tesscut_get_cutouts (self , product ):
941+ def test_tesscut_get_cutouts (self , product , caplog ):
942942
943943 coord = SkyCoord (107.18696 , - 70.50919 , unit = "deg" )
944944
@@ -964,6 +964,11 @@ def test_tesscut_get_cutouts(self, product):
964964 assert len (cutout_hdus_list ) >= 1
965965 assert isinstance (cutout_hdus_list [0 ], fits .HDUList )
966966
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+
967972 def test_tesscut_get_cutouts_mt (self ):
968973
969974 # Moving target functionality testing
@@ -1016,6 +1021,15 @@ def test_tesscut_get_cutouts_mt(self):
10161021 moving_target = True )
10171022 assert error_tica_mt in str (error_msg .value )
10181023
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+
10191033 ###################
10201034 # ZcutClass tests #
10211035 ###################
0 commit comments