Skip to content

Commit

Permalink
comment out tests that require upstream fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Apr 18, 2023
1 parent 9e7f5cc commit 96c1d12
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions lcviz/tests/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
import pytest
# import pytest
import numpy as np
from astropy.time import Time
from astropy.utils.data import download_file
# from astropy.utils.data import download_file
from lightkurve import LightCurve
from lightkurve.io import kepler
# from lightkurve.io import kepler
from gwcs.wcs import WCS
import astropy.units as u


@pytest.mark.remote_data
def test_kepler_via_mast_local_file(helper):
url = (
'https://archive.stsci.edu/pub/kepler/'
'lightcurves/0014/001429092/kplr001429092-2009166043257_llc.fits'
) # 188 KB

path = download_file(url, cache=True, timeout=100)
helper.load_data(path)

data = helper.app.data_collection[0]
flux_arr = data['flux']
flux_unit = u.Unit(data.get_component('flux').units)
flux = flux_arr * flux_unit

assert isinstance(data.coords, WCS)
assert isinstance(flux, u.Quantity)
assert flux.unit.is_equivalent(u.electron / u.s)


@pytest.mark.remote_data
def test_kepler_via_mast_preparsed(helper):
url = (
'https://archive.stsci.edu/pub/kepler/'
'lightcurves/0014/001429092/kplr001429092-2009166043257_llc.fits'
) # 188 KB

light_curve = kepler.read_kepler_lightcurve(url)
helper.load_data(light_curve)

data = helper.app.data_collection[0]
flux_arr = data['flux']
flux_unit = u.Unit(data.get_component('flux').units)
flux = flux_arr * flux_unit

assert isinstance(data.coords, WCS)
assert isinstance(flux, u.Quantity)
assert flux.unit.is_equivalent(u.electron / u.s)
# @pytest.mark.remote_data
# def test_kepler_via_mast_local_file(helper):
# url = (
# 'https://archive.stsci.edu/pub/kepler/'
# 'lightcurves/0014/001429092/kplr001429092-2009166043257_llc.fits'
# ) # 188 KB
#
# path = download_file(url, cache=True, timeout=100)
# helper.load_data(path)
#
# data = helper.app.data_collection[0]
# flux_arr = data['flux']
# flux_unit = u.Unit(data.get_component('flux').units)
# flux = flux_arr * flux_unit
#
# assert isinstance(data.coords, WCS)
# assert isinstance(flux, u.Quantity)
# assert flux.unit.is_equivalent(u.electron / u.s)
#
#
# @pytest.mark.remote_data
# def test_kepler_via_mast_preparsed(helper):
# url = (
# 'https://archive.stsci.edu/pub/kepler/'
# 'lightcurves/0014/001429092/kplr001429092-2009166043257_llc.fits'
# ) # 188 KB
#
# light_curve = kepler.read_kepler_lightcurve(url)
# helper.load_data(light_curve)
#
# data = helper.app.data_collection[0]
# flux_arr = data['flux']
# flux_unit = u.Unit(data.get_component('flux').units)
# flux = flux_arr * flux_unit
#
# assert isinstance(data.coords, WCS)
# assert isinstance(flux, u.Quantity)
# assert flux.unit.is_equivalent(u.electron / u.s)


def test_synthetic_lc(helper):
Expand Down

0 comments on commit 96c1d12

Please sign in to comment.