Skip to content

Commit d53047b

Browse files
authored
Merge pull request #2327 from bsipocz/alma_slow_test_cleanup
Cleanup test decorations
2 parents 540c690 + 4fdc765 commit d53047b

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

astroquery/alma/tests/test_alma_remote.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import shutil
44
import numpy as np
55
import pytest
6-
import warnings
6+
77
from datetime import datetime
88
import os
99
from urllib.parse import urlparse
@@ -40,7 +40,7 @@ def alma(request):
4040
"""
4141
alma = Alma()
4242
alma_site = request.config.getoption('--alma-site',
43-
'almascience.org')
43+
'almascience.eso.org')
4444
alma.archive_url = 'https://{}'.format(alma_site)
4545
return alma
4646

@@ -85,9 +85,6 @@ def test_freq(self, alma):
8585
assert row['frequency'] <= 100
8686
assert '3' in row['band_list']
8787

88-
@pytest.mark.skipif("SKIP_SLOW",
89-
reason="Extremely slow due to limitations of "
90-
"the implementation")
9188
def test_bands(self, alma):
9289
payload = {'band_list': ['5', '7']}
9390
result = alma.query(payload)
@@ -116,14 +113,14 @@ def test_alma_source_name(self, alma):
116113
for row in result:
117114
assert 'GRB021004' == row['target_name']
118115

119-
@pytest.mark.skipif("SKIP_SLOW", reason="Known issue")
120116
def test_ra_dec(self, alma):
121117
payload = {'ra_dec': '181.0192d -0.01928d'}
122118
result = alma.query(payload)
123119
assert len(result) > 0
124120

125121
@pytest.mark.skipif("SKIP_SLOW")
126122
def test_m83(self, temp_dir, alma):
123+
# Runs for over 9 minutes
127124
alma.cache_location = temp_dir
128125

129126
m83_data = alma.query_object('M83', science=True, legacy_columns=True)
@@ -205,6 +202,8 @@ def test_download_data(self, temp_dir, alma):
205202
assert len(results) == len(urls)
206203

207204
def test_download_and_extract(self, temp_dir, alma):
205+
# TODO: slowish, runs for ~90s
206+
208207
alma.cache_location = temp_dir
209208
alma._cycle0_tarfile_content_table = {'ID': ''}
210209

@@ -247,7 +246,6 @@ def test_download_and_extract(self, temp_dir, alma):
247246
'cache_path/' + asdm_url.split('/')[-1])
248247
assert downloaded_asdm == [os.path.join(temp_dir, 'foo.py')]
249248

250-
@pytest.mark.skipif("SKIP_SLOW", reason="Known issue")
251249
def test_doc_example(self, temp_dir, alma):
252250
alma.cache_location = temp_dir
253251
m83_data = alma.query_object('M83', legacy_columns=True)
@@ -304,7 +302,7 @@ def test_query(self, temp_dir, alma):
304302
# science=True)
305303
# assert len(result) == 1
306304

307-
@pytest.mark.skipif("SKIP_SLOW", reason="ra dec search known issue")
305+
@pytest.mark.xfail(reason="ra dec search known issue")
308306
def test_misc(self, alma):
309307
# miscellaneous set of common tests
310308
#
@@ -367,7 +365,6 @@ def test_misc(self, alma):
367365
assert '6' == row['band_list']
368366
assert 'ginsburg' in row['obs_creator_name'].lower()
369367

370-
@pytest.mark.skipif("SKIP_SLOW")
371368
def test_user(self, alma):
372369
# miscellaneous set of tests from current users
373370
rslt = alma.query({'band_list': [6], 'project_code': '2012.1.*'},
@@ -380,7 +377,6 @@ def test_user(self, alma):
380377
# This has been reported, as it is definitely a bug.
381378
@pytest.mark.xfail
382379
@pytest.mark.bigdata
383-
@pytest.mark.skipif("SKIP_SLOW")
384380
def test_cycle1(self, temp_dir, alma):
385381
# About 500 MB
386382
alma.cache_location = temp_dir
@@ -427,7 +423,7 @@ def test_cycle1(self, temp_dir, alma):
427423
assert len(data) == 6
428424

429425
@pytest.mark.skipif("SKIP_SLOW")
430-
@pytest.mark.skip("Not working anymore")
426+
@pytest.mark.xfail(reason="Not working anymore")
431427
def test_cycle0(self, temp_dir, alma):
432428
# About 20 MB
433429
alma.cache_location = temp_dir

astroquery/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def pytest_addoption(parser):
5353
parser.addoption(
5454
'--alma-site',
5555
action='store',
56-
default='almascience.org',
56+
default='almascience.eso.org',
5757
help='ALMA site (almascience.nrao.edu, almascience.eso.org or '
5858
'almascience.nao.ac.jp for example)'
5959
)

0 commit comments

Comments
 (0)