11# -*- coding: utf-8 -*-
22
3+ import os
4+ import sys
35import numpy as np
46import pytest
57from fsps import StellarPopulation , filters
68from numpy .testing import assert_allclose
79
10+ skip_slow_tests = pytest .mark .skipif (
11+ (sys .platform .startswith ("win" ) or sys .platform .startswith ("darwin" ))
12+ and "CI" in os .environ ,
13+ reason = "Slow tests only run on Linux CI" ,
14+ )
15+
816
917@pytest .fixture (scope = "module" )
1018def pop_and_params ():
@@ -19,6 +27,7 @@ def _reset_default_params(pop, params):
1927 pop .params [k ] = params [k ]
2028
2129
30+ @skip_slow_tests
2231def test_isochrones (pop_and_params ):
2332 """Just test that `isochrones()` method runs"""
2433
@@ -30,6 +39,7 @@ def test_isochrones(pop_and_params):
3039 iso = pop .isochrones ()
3140
3241
42+ @skip_slow_tests
3343def test_imf3 (pop_and_params ):
3444 """Make sure that changing the (upper) imf changes the parameter dirtiness
3545 and also the SSP spectrum"""
@@ -105,6 +115,7 @@ def test_smooth_lsf(pop_and_params):
105115 assert pop .params .dirtiness == 2
106116
107117
118+ @skip_slow_tests
108119def test_tabular (pop_and_params ):
109120 """Test that you get the right shape spectral arrays for tabular SFHs, that
110121 the parameter dirtiness is appropriately managed for changing tabular SFH,
@@ -363,6 +374,7 @@ def test_smoothspec(pop_and_params):
363374 assert (spec - spec2 == 0.0 ).sum () > 0
364375
365376
377+ @skip_slow_tests
366378def test_ssp_weights (pop_and_params ):
367379 """Check that weights dotted into ssp is the same as the returned spectrum
368380 when there's no dust or emission lines and zcontinuous=0"""
0 commit comments