From 35e5ca230ade3d10f9039f5c7e7bb31d5d9fb0ab Mon Sep 17 00:00:00 2001 From: Tom Wagg Date: Thu, 21 Sep 2023 14:14:57 -0400 Subject: [PATCH] skip SCF IO test if GSL not enabled --- gala/potential/potential/tests/test_io.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gala/potential/potential/tests/test_io.py b/gala/potential/potential/tests/test_io.py index c53c9934..d1f6eaad 100644 --- a/gala/potential/potential/tests/test_io.py +++ b/gala/potential/potential/tests/test_io.py @@ -4,6 +4,7 @@ import astropy.units as u from astropy.utils.data import get_pkg_data_filename import numpy as np +import pytest # Project from ..io import load, save @@ -13,6 +14,7 @@ from ..builtin.special import LM10Potential from ...scf import SCFPotential from ....units import DimensionlessUnitSystem, galactic +from gala._cconfig import GSL_ENABLED def test_read_plummer(): @@ -123,6 +125,8 @@ def test_units(tmpdir): p = load(tmp_filename) +@pytest.mark.skipif(not GSL_ENABLED, + reason="requires GSL to run this test") def test_read_write_SCF(tmpdir): tmp_filename = str(tmpdir.join("potential.yml"))