Skip to content

Commit b599a9a

Browse files
authored
Merge pull request #1011 from JuliaOpt/bl/approx_del_batch
Approximate check in delete in batch test
2 parents f29f182 + c97dd72 commit b599a9a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Test/UnitTests/modifications.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ solves correctly.
362362
"""
363363
function delete_variables_in_a_batch(model::MOI.ModelLike,
364364
config::TestConfig)
365+
atol = config.atol
366+
rtol = config.rtol
365367
MOI.empty!(model)
366368
@test MOI.is_empty(model)
367369
MOIU.loadfromstring!(model,"""
@@ -377,15 +379,15 @@ function delete_variables_in_a_batch(model::MOI.ModelLike,
377379
@test MOI.is_valid(model, z)
378380
if config.solve
379381
MOI.optimize!(model)
380-
@test MOI.get(model, MOI.ObjectiveValue()) == 6.0
382+
@test MOI.get(model, MOI.ObjectiveValue()) 6.0 atol=atol rtol=rtol
381383
end
382384
MOI.delete(model, [x, z])
383385
@test !MOI.is_valid(model, x)
384386
@test MOI.is_valid(model, y)
385387
@test !MOI.is_valid(model, z)
386388
if config.solve
387389
MOI.optimize!(model)
388-
@test MOI.get(model, MOI.ObjectiveValue()) == 2.0
390+
@test MOI.get(model, MOI.ObjectiveValue()) 2.0 atol=atol rtol=rtol
389391
end
390392
end
391393
modificationtests["delete_variables_in_a_batch"] = delete_variables_in_a_batch

0 commit comments

Comments
 (0)