11# Licensed under a 3-clause BSD style license - see LICENSE.rst
22import numpy as np
3+ import warnings
4+
35from astropy import wcs
46from astropy import units as u
57from astropy .tests .helper import pytest , remote_data
@@ -24,7 +26,11 @@ def test_pyregion_subset():
2426 shape .coord_list = (0.1 , 0.1 , 10. / 3600. )
2527 shape .attr = ([], {})
2628 data = np .ones ([40 , 40 ])
27- (xlo , xhi , ylo , yhi ), d = utils .pyregion_subset (shape , data , mywcs )
29+
30+ # The following line raises a DeprecationWarning from pyregion, ignore it
31+ with warnings .catch_warnings ():
32+ warnings .filterwarnings ('ignore' )
33+ (xlo , xhi , ylo , yhi ), d = utils .pyregion_subset (shape , data , mywcs )
2834
2935 # sticky note over check-engine light solution... but this problem is too
3036 # large in scope to address here. See
@@ -38,7 +44,6 @@ def test_pyregion_subset():
3844 data .shape [1 ] / 2 - mywcs .wcs .crpix [1 ] - 1 )
3945 np .testing .assert_almost_equal (yhi ,
4046 data .shape [1 ] - mywcs .wcs .crpix [1 ] - 1 )
41-
4247frq_sup_str = ('[86.26..88.14GHz,976.56kHz, XX YY] U '
4348 '[88.15..90.03GHz,976.56kHz, XX YY] U '
4449 '[98.19..100.07GHz,976.56kHz, XX YY] U '
0 commit comments