Skip to content

Commit

Permalink
TST: Fix tests downloading data into source dir.
Browse files Browse the repository at this point in the history
MNT: Remove unnecessary astropy check.
  • Loading branch information
pllim committed Jul 30, 2024
1 parent 682e302 commit e26b9ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import pytest
import warnings

pytest.importorskip("astropy", minversion="5.3.2")

import numpy as np
from astropy import units as u
from astropy.io import fits
Expand Down Expand Up @@ -572,6 +570,7 @@ def test_default_spectral_extraction(cubeviz_helper, spectrum1d_cube_fluxunit_jy
)


@pytest.mark.usefixtures('_jail')
@pytest.mark.remote_data
@pytest.mark.parametrize(
"start_slice, aperture, expected_rtol, uri, calspec_url",
Expand Down
6 changes: 5 additions & 1 deletion jdaviz/core/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ def open(filename, show=True, **kwargs):
The autoidentified ConfigHelper for the given data
'''
# first catch URIs and download them, or return filename unchanged:
filename = download_uri_to_path(filename, cache=True)
if "local_path" in kwargs:
fn_dl_kw = {"local_path": kwargs["local_path"]}
else:
fn_dl_kw = {}
filename = download_uri_to_path(filename, cache=True, **fn_dl_kw)

# Identify the correct config
compatible_helpers, hdul = identify_helper(filename)
Expand Down

0 comments on commit e26b9ef

Please sign in to comment.