Skip to content

Commit

Permalink
remove tests for old data-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Dec 6, 2024
1 parent c6a91f4 commit c2e3ebc
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 116 deletions.
40 changes: 40 additions & 0 deletions jdaviz/core/tests/test_config_detection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import pytest
import numpy as np

from astropy.utils.data import download_file
from specutils import SpectralRegion

from jdaviz.core.data_formats import identify_helper

# URIs to example JWST/HST files on MAST, and their
# corresponding jdaviz helpers:
example_uri_helper = [
['mast:HST/product/id4301ouq_drz.fits', 'imviz'],
['mast:HST/product/ldq601030_x1dsum.fits', 'specviz'],
['mast:HST/product/o4xw01dkq_flt.fits', 'specviz2d'],
['mast:JWST/product/jw02072-c1003_s00002_nirspec_clear-prism-s200a1_x1d.fits',
'specviz'],
['mast:JWST/product/jw01324-o006_s00005_nirspec_f100lp-g140h_s2d.fits',
'specviz2d'],
['mast:JWST/product/jw01345-o001_t021_nircam_clear-f200w_i2d.fits', 'imviz'],
['mast:JWST/product/jw01373-o028_t001_nirspec_g395h-f290lp_s3d.fits',
'cubeviz'],
['mast:JWST/product/jw01373-o031_t007_miri_ch1-shortmediumlong_s3d.fits',
'cubeviz'],
['mast:JWST/product/jw01783-o004_t008_nircam_clear-f444w_i2d.fits', 'imviz'],
['mast:JWST/product/jw02732-o004_t004_miri_ch1-shortmediumlong_x1d.fits',
'specviz']
]

@pytest.mark.skip(reason="filenames changed")
@pytest.mark.remote_data
@pytest.mark.filterwarnings(r"ignore::astropy.wcs.wcs.FITSFixedWarning")
@pytest.mark.parametrize(
"uri, expected_helper", example_uri_helper
)
def test_auto_config_detection(uri, expected_helper):
url = f'https://mast.stsci.edu/api/v0.1/Download/file/?uri={uri}'
fn = download_file(url, timeout=100)
helper_name, hdul = identify_helper(fn)
hdul.close()
assert helper_name == expected_helper
116 changes: 0 additions & 116 deletions jdaviz/core/tests/test_data_menu.py

This file was deleted.

0 comments on commit c2e3ebc

Please sign in to comment.