File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
pyomo/contrib/observer/tests Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments