Skip to content

Commit 4cea685

Browse files
committed
run black
1 parent 880dfe8 commit 4cea685

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pyomo/contrib/observer/tests/test_change_detector.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -523,21 +523,23 @@ def test_manual_updates(self):
523523

524524
def test_mutable_parameters_in_sos(self):
525525
"""
526-
There is logic in the ModelChangeDetector to handle
526+
There is logic in the ModelChangeDetector to handle
527527
mutable parameters in SOS constraints. However, we cannot
528528
currently test it because of #3769. For now, we will
529529
just make sure that an error is raised when attempting to
530530
use a mutable parameter in an SOS constraint. If #3769 is
531-
resolved, we will just need to update this test to make
531+
resolved, we will just need to update this test to make
532532
sure the ModelChangeDetector does the right thing.
533533
"""
534534
m = pyo.ConcreteModel()
535-
m.a = pyo.Set(initialize=[1,2,3])
535+
m.a = pyo.Set(initialize=[1, 2, 3])
536536
m.x = pyo.Var(m.a)
537537
m.p = pyo.Param(m.a, mutable=True)
538538
m.p[1].value = 1
539539
m.p[2].value = 2
540540
m.p[3].value = 3
541541

542-
with self.assertRaisesRegex(PyomoException, 'Cannot convert non-constant Pyomo expression .* to bool.*'):
542+
with self.assertRaisesRegex(
543+
PyomoException, 'Cannot convert non-constant Pyomo expression .* to bool.*'
544+
):
543545
m.c = pyo.SOSConstraint(var=m.x, sos=1, weights=m.p)

0 commit comments

Comments
 (0)