Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions astroquery/alma/tests/test_alma_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
import numpy as np
from astropy import wcs
from astropy import units as u
from pyregion.parser_helper import Shape
from astropy.tests.helper import pytest, remote_data
try:
from pyregion.parser_helper import Shape
pyregion_OK = True
except ImportError:
pyregion_OK = False

from .. import utils

@pytest.mark.skipif('not pyregion_OK')
def test_pyregion_subset():
header = dict(naxis=2, crpix1=15, crpix2=15, crval1=0.1, crval2=0.1,
cdelt1=-1./3600, cdelt2=1./3600., ctype1='GLON-CAR',
Expand Down Expand Up @@ -39,8 +44,9 @@ def test_parse_frequency_support(frq_sup_str=frq_sup_str, result=franges):

def approximate_primary_beam_sizes(frq_sup_str=frq_sup_str, beamsizes=beamsizes):
assert np.all(utils.approximate_primary_beam_sizes(frq_sup_str) == beamsizes)

@remote_data
@pytest.mark.skipif('not pyregion_OK')
def test_make_finder_chart():
result = utils.make_finder_chart('Eta Carinae', 3*u.arcmin, 'Eta Carinae')
images, catalog, hit_mask_public, hit_mask_private = result
Expand Down