-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
3 deletions.
There are no files selected for viewing
20 changes: 17 additions & 3 deletions
20
jdaviz/configs/specviz2d/plugins/spectral_extraction/tests/test_spectral_extraction.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
import pytest | ||
from asdf.asdf import AsdfWarning | ||
from astropy.utils.data import download_file | ||
|
||
def test_plugin(specviz2d_helper, spectrum2d): | ||
label = "Test 1D Spectrum" | ||
specviz2d_helper.load_spectrum(spectrum2d, data_label=label) | ||
from specreduce import tracing | ||
|
||
|
||
@pytest.mark.remote_data | ||
def test_plugin(specviz2d_helper): | ||
fn = download_file('https://stsci.box.com/shared/static/exnkul627fcuhy5akf2gswytud5tazmw.fits', cache=True) # noqa | ||
|
||
with pytest.warns(AsdfWarning, match='jwextension'): | ||
specviz2d_helper.load_data(spectrum_2d=fn) | ||
|
||
pext = specviz2d_helper.app.get_tray_item_from_name('spectral-extraction') | ||
|
||
trace = pext.create_trace() | ||
assert isinstance(trace, tracing.Trace) |