Skip to content

Commit

Permalink
Add check to test_cons
Browse files Browse the repository at this point in the history
  • Loading branch information
Opt-Mucca committed Dec 8, 2023
1 parent 5326d41 commit 3cfe366
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_cons.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ def test_SOScons():
assert m.isEQ(m.getVal(x[3]), 1)
assert m.isEQ(m.getVal(x[4]), 1)
assert m.isEQ(m.getVal(x[5]), 1)
assert c1.getConshdlrName() == "SOS1"
assert c2.getConshdlrName() == "SOS1"


def test_cons_indicator():
Expand All @@ -112,6 +114,7 @@ def test_cons_indicator():
assert m.isEQ(m.getVal(slack), 0)
assert m.isEQ(m.getVal(binvar), 1)
assert m.isEQ(m.getVal(x), 1)
assert c.getConshdlrName() == "indicator"


@pytest.mark.xfail(reason="addConsIndicator doesn't behave as expected when binary variable is False. See Issue #717.")
Expand Down

0 comments on commit 3cfe366

Please sign in to comment.