Skip to content

Commit

Permalink
minimal plugin test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Jul 20, 2022
1 parent 3f7348a commit 1eccadb
Showing 1 changed file with 17 additions and 3 deletions.
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)

0 comments on commit 1eccadb

Please sign in to comment.