Add require_dependency
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
-import astropy.units as u
from astropy.io import fits
from astropy.table import Column, Table
from gammapy.utils.fits import ebounds_to_energy_axis
from gammapy.utils.scripts import make_path
+from gammapy.utils.testing import requires_data
# TODO: merge this fixture with the one in `test_table.py`.
# Need to move to conftest or can import?
@@ -46,7 +46,7 @@ def test_table_fits_io_astropy(table):
# Note: description doesn't come back in older versions of Astropy
# that we still support, so we're not asserting on that here for now.
-
+@requires_data()
def test_ebounds_to_energy_axis():
filename = "$GAMMAPY_DATA/joint-crab/spectra/hess/pha_obs23523.fits"
hdul = fits.open(make_path(filename))
