Commit 7dfa7d97 authored by Simon Conseil's avatar Simon Conseil

Skip test if joblib is missing

parent 2de5fcd5
import numpy as np
import pytest
from astropy.io import fits
from glob import glob
......@@ -7,6 +8,13 @@ from mpdaf.sdetect import Segmap, create_masks_from_segmap
from mpdaf.tests.utils import get_data_file
from numpy.testing import assert_array_equal
try:
import joblib # noqa
except ImportError:
HAS_JOBLIB = False
else:
HAS_JOBLIB = True
def test_segmap():
segfile = get_data_file('segmap', 'segmap.fits')
......@@ -41,6 +49,7 @@ def test_cut_header():
assert 'RADESYS' not in segmap.img.data_header
@pytest.mark.skipif(not HAS_JOBLIB, reason="requires joblib")
def test_create_masks(tmpdir):
segfile = get_data_file('segmap', 'segmap.fits')
reffile = get_data_file('segmap', 'image.fits')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment