Skip to content

Commit 0214136

Browse files
committed
fix test (had incorrect assumptions)
1 parent d987a81 commit 0214136

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ def test_solve_relaxation(solver):
13751375

13761376
# double-check constraint expressions
13771377
assert c1.idx == 0
1378-
expr1 = c1.expr
1378+
expr1 = c1.expr # store to avoid repeated calls
13791379
assert expr1.expr == pytest.approx({x: 1.0, z: -10.0})
13801380
assert expr1.const == pytest.approx(0.0)
13811381
assert expr1.sense == mip.LESS_OR_EQUAL
@@ -1389,7 +1389,7 @@ def test_solve_relaxation(solver):
13891389

13901390
assert c1.slack == pytest.approx(0.5)
13911391
assert c2.slack == pytest.approx(0.0)
1392-
assert c3.slack == pytest.approx(0.0)
1392+
assert c3.slack == pytest.approx(0.5)
13931393

13941394
# then compare LP relaxation
13951395
# (seems to fail for CBC?!)

0 commit comments

Comments
 (0)