From e41fc2818ab34482f8fb557a206adc491aa9b17e Mon Sep 17 00:00:00 2001 From: "Scott C. Livingston" Date: Mon, 30 Sep 2024 18:35:44 -0700 Subject: [PATCH] TEST: use marker nonfree for tests with Gurobi And this can be used to mark tests with MOSEK and other extra dependencies with restrictive licenses in the future. These tests are not included by default and must be requested: pytest -m nonfree tests --- tests/polytope_test.py | 1 + tests/pytest.ini | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 tests/pytest.ini diff --git a/tests/polytope_test.py b/tests/polytope_test.py index f43802a..b07a89e 100644 --- a/tests/polytope_test.py +++ b/tests/polytope_test.py @@ -616,6 +616,7 @@ def test_reduce(): assert_allclose(u, np.array([[50.], [1.]]), rtol=1e-07, atol=1e-07) +@pytest.mark.nonfree def test_gurobipy_return_same_result_as_scipy(): c, A, b = example_1d() result_gurobi = solvers.lpsolve(c, A, b, solver='gurobi') diff --git a/tests/pytest.ini b/tests/pytest.ini new file mode 100644 index 0000000..5fc918b --- /dev/null +++ b/tests/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +addopts = -m 'not nonfree'