diff --git a/pyomo/solvers/plugins/solvers/cplex_direct.py b/pyomo/solvers/plugins/solvers/cplex_direct.py index 5f8866a0ea4..39c5d0bc41c 100644 --- a/pyomo/solvers/plugins/solvers/cplex_direct.py +++ b/pyomo/solvers/plugins/solvers/cplex_direct.py @@ -48,7 +48,7 @@ def __init__( ): self.variables = variables self.coefficients = coefficients - self.offset = offset or 0. + self.offset = offset or 0.0 self.q_variables1 = q_variables1 or [] self.q_variables2 = q_variables2 or [] self.q_coefficients = q_coefficients or [] diff --git a/pyomo/solvers/tests/checks/test_CPLEXDirect.py b/pyomo/solvers/tests/checks/test_CPLEXDirect.py index 08b0d8e079f..f1954885483 100644 --- a/pyomo/solvers/tests/checks/test_CPLEXDirect.py +++ b/pyomo/solvers/tests/checks/test_CPLEXDirect.py @@ -153,6 +153,7 @@ def test_optimal_mip(self): @unittest.skipIf(not cplexpy_available, "The 'cplex' python bindings are not available") class TestIsFixedCallCount(unittest.TestCase): """ Tests for PR#1402 (669e7b2b) """ + def setup(self, skip_trivial_constraints): m = ConcreteModel() m.x = Var()