Skip to content

Commit

Permalink
Merge pull request #1 from bknueven/mis_bk
Browse files Browse the repository at this point in the history
fixing _get_constraint test
  • Loading branch information
DLWoodruff authored Mar 1, 2024
2 parents a24432b + 20e4196 commit 099eb8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions pyomo/contrib/mis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@
# ___________________________________________________________________________

from pyomo.contrib.mis.mis import compute_infeasibility_explanation

Check warning on line 12 in pyomo/contrib/mis/__init__.py

View workflow job for this annotation

GitHub Actions / lint/style-and-typos

"mis" should be "miss" or "mist".

Check warning on line 12 in pyomo/contrib/mis/__init__.py

View workflow job for this annotation

GitHub Actions / lint/style-and-typos

"mis" should be "miss" or "mist".
# so the tests can find it
from pyomo.contrib.mis.mis import _get_constraint
6 changes: 3 additions & 3 deletions pyomo/contrib/mis/tests/test_mis.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import pyomo.common.unittest as unittest
import pyomo.environ as pyo
import pyomo.contrib.mis as mis

Check warning on line 14 in pyomo/contrib/mis/tests/test_mis.py

View workflow job for this annotation

GitHub Actions / lint/style-and-typos

"mis" should be "miss" or "mist".

Check warning on line 14 in pyomo/contrib/mis/tests/test_mis.py

View workflow job for this annotation

GitHub Actions / lint/style-and-typos

"mis" should be "miss" or "mist".
from pyomo.contrib.mis.mis import _get_constraint

Check warning on line 15 in pyomo/contrib/mis/tests/test_mis.py

View workflow job for this annotation

GitHub Actions / lint/style-and-typos

"mis" should be "miss" or "mist".

Check warning on line 15 in pyomo/contrib/mis/tests/test_mis.py

View workflow job for this annotation

GitHub Actions / lint/style-and-typos

"mis" should be "miss" or "mist".
from pyomo.common.tempfiles import TempfileManager

import logging
Expand Down Expand Up @@ -42,9 +43,8 @@ def test_write_mis_ipopt(self):

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

m.foo_slack_plus_ = pyo.Var()
self.assertRaises(RuntimeError, fct, m, m.foo_slack_plus_)
Expand Down

0 comments on commit 099eb8b

Please sign in to comment.