@@ -0,0 +1,937 @@
+# Licensed under a 3-clause BSD style license - see LICENSE.rst%0Afrom __future__ import absolute_import, division, print_function, unicode_literals%0Afrom astropy.tests.helper import pytest%0A%0A__all__ = %5B'requires_dependency'%5D%0A%0A%0Adef requires_dependency(name):%0A    %22%22%22Decorator to declare required dependencies for tests.%0A%0A    Examples%0A    --------%0A%0A    ::%0A%0A        from fermipy.tests.utils import requires_dependency%0A%0A        @requires_dependency('scipy')%0A        def test_using_scipy():%0A            import scipy%0A            ...%0A%0A        @requires_dependency('Fermi ST')%0A        def test_using_fermi_science_tools():%0A            import pyLikelihood%0A            ...%0A    %22%22%22%0A    if name == 'Fermi ST':%0A        name = 'pyLikelihood'%0A%0A    try:%0A        __import__(name)%0A        skip_it = False%0A    except ImportError:%0A        skip_it = True%0A%0A    reason = 'Missing dependency: %7B%7D'.format(name)%0A    return pytest.mark.skipif(skip_it, reason=reason)%0A

Add fermipy/tests/utils.py