Skip to content

Commit 20e4196

Browse files
committed
fixing _get_constraint test
1 parent a24432b commit 20e4196

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pyomo/contrib/mis/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@
1010
# ___________________________________________________________________________
1111

1212
from pyomo.contrib.mis.mis import compute_infeasibility_explanation
13-
# so the tests can find it
14-
from pyomo.contrib.mis.mis import _get_constraint

pyomo/contrib/mis/tests/test_mis.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import pyomo.common.unittest as unittest
1313
import pyomo.environ as pyo
1414
import pyomo.contrib.mis as mis
15+
from pyomo.contrib.mis.mis import _get_constraint
1516
from pyomo.common.tempfiles import TempfileManager
1617

1718
import logging
@@ -42,9 +43,8 @@ def test_write_mis_ipopt(self):
4243

4344
def test__get_constraint_errors(self):
4445
# A not-completely-cyincal way to get the coverage up.
45-
m = _get_infeasible_model() # not modified, but who cares?
46-
fct = getattr(mis, "_get_constraint")
47-
# fct = mis._get_constraint
46+
m = _get_infeasible_model() # not modified
47+
fct = _get_constraint
4848

4949
m.foo_slack_plus_ = pyo.Var()
5050
self.assertRaises(RuntimeError, fct, m, m.foo_slack_plus_)

0 commit comments

Comments
 (0)