Skip to content

Commit d0e87e2

Browse files
committed
add a regression test (remote-only)
1 parent 9113509 commit d0e87e2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

astroquery/alma/tests/test_alma_remote.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,3 +677,23 @@ def test_staging_stacking(dataarchive_url):
677677

678678
alma.stage_data(['uid://A001/X13d5/X1d', 'uid://A002/X3216af/X31',
679679
'uid://A001/X12a3/X240'])
680+
681+
682+
@pytest.mark.remote_data
683+
@pytest.mark.skipif("SKIP_SLOW", "Huge data file download")
684+
@pytest.mark.parametrize('dataarchive_url', _test_url_list)
685+
def test_big_download_regression(dataarchive_url):
686+
"""
687+
Regression test for #2020/#2021 - this download fails if logging tries to
688+
load the whole data file into memory.
689+
"""
690+
result = Alma.query({'project_code':'2013.1.01365.S'})
691+
uids = np.unique(result['member_ous_uid'])
692+
files = Alma.get_data_info(uids)
693+
694+
#we may need to change the cache dir for this to work on testing machines?
695+
# savedir='/big/data/path/'
696+
# Alma.cache_dir=savedir
697+
698+
# this is a big one that fails
699+
Alma.download_files([files['access_url'][3]])

0 commit comments

Comments
 (0)