Skip to content

Commit 287cce6

Browse files
committed
fix so that products downloaded to temp directory
1 parent 1bdf695 commit 287cce6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

astroquery/mast/tests/test_mast_remote.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ def test_observations_filter_products(self):
416416
assert isinstance(result, Table)
417417
assert len(result) == sum(products['productType'] == "SCIENCE")
418418

419-
def test_observations_download_products(self, tmpdir):
419+
def test_observations_download_products(self, tmp_path):
420420
def check_filepath(path):
421421
assert os.path.isfile(path)
422422
os.remove(path)
423423

424424
test_obs_id = '25119363'
425425
result = Observations.download_products(test_obs_id,
426-
download_dir=str(tmpdir),
426+
download_dir=tmp_path,
427427
productType=["SCIENCE"],
428428
mrp_only=False)
429429
assert isinstance(result, Table)
@@ -433,7 +433,7 @@ def check_filepath(path):
433433

434434
# just get the curl script
435435
result = Observations.download_products(test_obs_id,
436-
download_dir=str(tmpdir),
436+
download_dir=tmp_path,
437437
curl_flag=True,
438438
productType=["SCIENCE"],
439439
mrp_only=False)
@@ -442,7 +442,8 @@ def check_filepath(path):
442442

443443
# check for row input
444444
result1 = Observations.get_product_list(test_obs_id)
445-
result2 = Observations.download_products(result1[0])
445+
result2 = Observations.download_products(result1[0],
446+
download_dir=tmp_path)
446447
assert isinstance(result2, Table)
447448
check_filepath(result2['Local Path'][0])
448449
assert len(result2) == 1

0 commit comments

Comments
 (0)