Skip to content

Commit fe25a07

Browse files
committed
fixes related to remote tests
1 parent e6800ea commit fe25a07

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

astroquery/alma/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from astropy.table import Table, Column
1717
from astropy import log
1818
from astropy.utils.console import ProgressBar
19+
from astropy import units as u
1920
import astropy.io.votable as votable
2021

2122
from ..exceptions import LoginError, RemoteServiceError
@@ -54,7 +55,7 @@ def query_region_async(self, coordinate, radius, cache=True, public=True,
5455
5556
"""
5657
cstr = coordinate.fk5.to_string(style='hmsdms', sep=':')
57-
rdc = "{cstr}, {rad}".format(cstr, radius.to(u.deg).value)
58+
rdc = "{cstr}, {rad}".format(cstr=cstr, rad=radius.to(u.deg).value)
5859

5960
payload = {'raDecCoordinates': rdc}
6061

astroquery/alma/tests/test_alma.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from .. import Alma
66
from ...utils.testing_tools import MockResponse
77

8+
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
89

910
def data_path(filename):
1011
return os.path.join(DATA_DIR, filename)

astroquery/alma/tests/test_alma_remote.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import tempfile
44
import shutil
55
from astropy.tests.helper import pytest, remote_data
6+
from astropy import coordinates
7+
from astropy import units as u
68
from .. import Alma
79
from ...exceptions import LoginError
810

@@ -23,7 +25,8 @@ def test_SgrAstar(self, temp_dir):
2325

2426
result_s = alma.query_object('Sgr A*')
2527
assert '2011.0.00217.S' in result_s['Project_code']
26-
c = coordinates.SkyCoord(266.41681662, -29.00782497, frame='fk5')
28+
c = coordinates.SkyCoord(266.41681662*u.deg, -29.00782497*u.deg,
29+
frame='fk5')
2730
result_c = alma.query_region(c, 1*u.deg)
2831
assert '2011.0.00217.S' in result_c['Project_code']
2932

0 commit comments

Comments
 (0)