Skip to content

Commit

Permalink
NFC: apply black
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiirola committed Nov 29, 2023
1 parent ae10ad2 commit bb5cee6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pyomo/repn/tests/ampl/test_nlv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1565,18 +1565,17 @@ def test_presolve_named_expressions(self):
m.eq = pyo.Constraint(pyo.Integers)
m.eq[1] = m.x[1] == 7
m.eq[2] = m.x[3] == 0.1 * m.subexpr[1] * m.x[2]
m.obj = pyo.Objective(expr=m.x[1]**2 + m.x[2]**2 + m.x[3]**3)
m.obj = pyo.Objective(expr=m.x[1] ** 2 + m.x[2] ** 2 + m.x[3] ** 3)

OUT = io.StringIO()
with LoggingIntercept() as LOG:
nlinfo = nl_writer.NLWriter().write(m, OUT, symbolic_solver_labels=True, linear_presolve=True)
nlinfo = nl_writer.NLWriter().write(
m, OUT, symbolic_solver_labels=True, linear_presolve=True
)
self.assertEqual(LOG.getvalue(), "")

self.assertEqual(
nlinfo.eliminated_vars,
[
(m.x[1], nl_writer.AMPLRepn(7, {}, None)),
],
nlinfo.eliminated_vars, [(m.x[1], nl_writer.AMPLRepn(7, {}, None))]
)

self.assertEqual(
Expand Down Expand Up @@ -1634,7 +1633,6 @@ def test_presolve_named_expressions(self):
)
)


def test_scaling(self):
m = pyo.ConcreteModel()
m.x = pyo.Var(initialize=0)
Expand Down

0 comments on commit bb5cee6

Please sign in to comment.