From 17ae327119550c72cfbb736e6dd80c69d9b43299 Mon Sep 17 00:00:00 2001 From: Alexander Dowling Date: Wed, 3 Jun 2020 20:01:15 -0400 Subject: [PATCH] Made test for k_aug conditional. --- pyomo/contrib/parmest/tests/test_parmest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyomo/contrib/parmest/tests/test_parmest.py b/pyomo/contrib/parmest/tests/test_parmest.py index 7e58909f878..dd02f35deae 100644 --- a/pyomo/contrib/parmest/tests/test_parmest.py +++ b/pyomo/contrib/parmest/tests/test_parmest.py @@ -40,6 +40,7 @@ from pyomo.opt import SolverFactory ipopt_available = SolverFactory('ipopt').available() +k_aug_available = SolverFactory('k_aug').available() testdir = os.path.dirname(os.path.abspath(__file__)) @@ -198,7 +199,7 @@ def test_parallel_parmest(self): retcode = subprocess.call(rlist) assert(retcode == 0) - @unittest.skip("Most folks don't have k_aug installed") + @unittest.skipIf(not k_aug_available,"k_aug is not available") def test_theta_k_aug_for_Hessian(self): # this will fail if k_aug is not installed objval, thetavals, Hessian = self.pest.theta_est(solver="k_aug")