diff --git a/python/test/test_alm.py b/python/test/test_alm.py index 62fcf89a7b..c961d0e3c6 100644 --- a/python/test/test_alm.py +++ b/python/test/test_alm.py @@ -3,7 +3,10 @@ import alpaqa as pa import numpy as np from pprint import pprint +import pytest + +@pytest.mark.skipif(not pa.with_casadi, reason="requires CasADi") def test_alm(): import alpaqa.casadi_loader as cl @@ -59,6 +62,7 @@ def test_alm(): assert np.linalg.norm(y - [0, -2/3]) < 1e-5 +@pytest.mark.skipif(not pa.with_casadi, reason="requires CasADi") def test_alm_pyapi_compile(): import casadi as cs @@ -97,6 +101,7 @@ def test_alm_pyapi_compile(): assert np.linalg.norm(y - [0, -2/3]) < 1e-5 +@pytest.mark.skipif(not pa.with_casadi, reason="requires CasADi") def test_alm_pyapi_build(): import casadi as cs diff --git a/python/test/test_alm_thread.py b/python/test/test_alm_thread.py index 36e997db28..9c3846e9e2 100644 --- a/python/test/test_alm_thread.py +++ b/python/test/test_alm_thread.py @@ -6,6 +6,7 @@ import os +@pytest.mark.skipif(not pa.with_casadi, reason="requires CasADi") def test_alm_threaded(): valgrind = 'valgrind' in os.getenv('LD_PRELOAD', '')