From dabafbf4a08ab5f72157dd1488b39c81a5a0b0c1 Mon Sep 17 00:00:00 2001 From: Emma Johnson Date: Tue, 6 Aug 2024 09:46:06 -0600 Subject: [PATCH] Skipping 3 more tests if scipy is not available --- pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py b/pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py index fec3245edd3..67d0bb9f098 100644 --- a/pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py +++ b/pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py @@ -255,6 +255,7 @@ def test_error_for_non_separable_exceeding_max_dimension(self): ) @unittest.skipUnless(numpy_available, "Numpy is not available") + @unittest.skipUnless(scipy_available, "Scipy is not available") def test_do_not_additively_decompose_below_min_dimension(self): m = ConcreteModel() m.x = Var([0, 1, 2, 3, 4], bounds=(-4, 5)) @@ -317,6 +318,7 @@ def check_pw_linear_paraboloid(self, m, pwlf, x1, x2, y1, y2): self.assertEqual(len(nonlinear), 0) @unittest.skipUnless(numpy_available, "Numpy is not available") + @unittest.skipUnless(scipy_available, "Scipy is not available") def test_paraboloid_objective_uniform_grid(self): m = self.make_paraboloid_model() @@ -344,6 +346,7 @@ def test_paraboloid_objective_uniform_grid(self): self.check_pw_linear_paraboloid(m, pwlf, x1, x2, y1, y2) @unittest.skipUnless(numpy_available, "Numpy is not available") + @unittest.skipUnless(scipy_available, "Scipy is not available") def test_objective_target(self): m = self.make_paraboloid_model()