Skip to content

Commit 3546ab7

Browse files
committed
Use tmp_path instead of tmp_cwd for test
1 parent 264309a commit 3546ab7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

astroquery/mast/tests/test_mast_remote.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,7 @@ def test_observations_get_cloud_uris_no_duplicates(self, msa_product_table):
366366
uris = mast.Observations.get_cloud_uris(products)
367367
assert len(uris) == 1
368368

369-
def test_observations_download_file(self, tmp_cwd):
370-
371-
# enabling cloud connection
372-
mast.Observations.enable_cloud_dataset(provider='AWS')
369+
def test_observations_download_file(self, tmp_path):
373370

374371
# get observations from GALEX instrument with query_criteria
375372
observations = mast.Observations.query_criteria(objectname='M1',
@@ -383,9 +380,10 @@ def test_observations_download_file(self, tmp_cwd):
383380

384381
# pull the URI of a single product
385382
uri = products['dataURI'][0]
383+
local_path = Path(tmp_path, Path(uri).name)
386384

387385
# download it
388-
result = mast.Observations.download_file(uri, cloud_only=True)
386+
result = mast.Observations.download_file(uri, local_path=local_path)
389387
assert result == ('COMPLETE', None, None)
390388

391389
def test_get_cloud_uri(self):

0 commit comments

Comments
 (0)