Skip to content

Commit 5bc3347

Browse files
committed
Cleanup test decorations: remove obsolete slow marks and change known failures to fail
1 parent fac66a1 commit 5bc3347

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

astroquery/alma/tests/test_alma_remote.py

Lines changed: 6 additions & 10 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
@@ -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

0 commit comments

Comments
 (0)