Skip to content

Commit

Permalink
fix tests such that they actually fail on present master
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich committed Jun 27, 2020
1 parent f8665ef commit a95fc8f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions spectral_cube/tests/test_spectral_cube.py
Expand Up @@ -20,6 +20,8 @@
from astropy.convolution import Gaussian2DKernel, Tophat2DKernel
import numpy as np

import dask

from .. import (BooleanArrayMask,
FunctionMask, LazyMask, CompositeMask)
from ..spectral_cube import (OneDSpectrum, Projection,
Expand All @@ -30,7 +32,7 @@
from .. import base_class
from .. import utils

from .. import SpectralCube, VaryingResolutionSpectralCube
from .. import SpectralCube, VaryingResolutionSpectralCube, DaskSpectralCube


from . import path
Expand Down Expand Up @@ -1995,15 +1997,18 @@ def test_mad_std(data_adv, use_dask):


def test_mad_std_nan(data_adv, use_dask):

cube, data = cube_and_raw(data_adv, use_dask=use_dask)
# HACK in a nan
data[1,1,0] = np.nan
hdu = cube.hdu
hdu.data = data
# use the include-everything mask so we're really testing that nan is ignored
oldmask = cube.mask
cube = SpectralCube.read(hdu)
if use_dask:
cube = DaskSpectralCube.read(hdu)
cube._data = dask.array.from_array(cube._data)
else:
cube = SpectralCube.read(hdu)

if int(astropy.__version__[0]) < 2:
with pytest.raises(NotImplementedError) as exc:
Expand Down

0 comments on commit a95fc8f

Please sign in to comment.