Skip to content

Commit 2be1117

Browse files
committed
Add TypeError test for addConsIndicator with binvar
1 parent 3b64e79 commit 2be1117

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_cons.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ def test_cons_indicator_with_matrix_binvar():
183183
# test matrix variable binvar #1043
184184
m = Model()
185185

186+
with pytest.raises(TypeError):
187+
m.addConsIndicator(m.addVar(vtype="B") <= 1, 1)
188+
186189
# test binvar with (1, 1, 1) shape of matrix variable
187190
x = m.addVar(vtype="B")
188191
binvar1 = m.addMatrixVar(((1, 1, 1)), vtype="B")

0 commit comments

Comments
 (0)