Skip to content

Commit

Permalink
Remove failing tests thanks to new MOI release (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat authored Jan 3, 2024
1 parent 78a903c commit 0e4dff8
Showing 1 changed file with 29 additions and 40 deletions.
69 changes: 29 additions & 40 deletions test/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,9 @@ function test_options()
end

function test_runtests()
model = MOI.Utilities.CachingOptimizer(
MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()),
MOI.instantiate(SDPA.Optimizer; with_bridge_type = Float64),
)
model = MOI.instantiate(SDPA.Optimizer; with_bridge_type = Float64)
# `Variable.ZerosBridge` makes dual needed by some tests fail.
MOI.Bridges.remove_bridge(
model.optimizer,
MOI.Bridges.Variable.ZerosBridge{Float64},
)
MOI.Bridges.remove_bridge(model, MOI.Bridges.Variable.ZerosBridge{Float64})
MOI.set(model, MOI.Silent(), true)
MOI.Test.runtests(
model,
Expand All @@ -63,52 +57,47 @@ function test_runtests()
MOI.SolverVersion,
],
);
exclude = String[
# Unable to bridge RotatedSecondOrderCone to PSD because the dimension is too small: got 2, expected >= 3.
"test_conic_SecondOrderCone_INFEASIBLE",
"test_constraint_PrimalStart_DualStart_SecondOrderCone",
exclude = Regex[
# Expression: MOI.get(model, MOI.TerminationStatus()) == MOI.INFEASIBLE
# Evaluated: MathOptInterface.INFEASIBLE_OR_UNBOUNDED == MathOptInterface.INFEASIBLE
"test_conic_NormInfinityCone_INFEASIBLE",
"test_conic_NormOneCone_INFEASIBLE",
r"test_conic_NormInfinityCone_INFEASIBLE$",
r"test_conic_NormOneCone_INFEASIBLE$",
r"test_conic_SecondOrderCone_INFEASIBLE$",
r"test_solve_DualStatus_INFEASIBILITY_CERTIFICATE_EqualTo_lower$",
r"test_solve_DualStatus_INFEASIBILITY_CERTIFICATE_EqualTo_upper$",
r"test_solve_DualStatus_INFEASIBILITY_CERTIFICATE_GreaterThan$",
r"test_solve_DualStatus_INFEASIBILITY_CERTIFICATE_Interval_lower$",
r"test_solve_DualStatus_INFEASIBILITY_CERTIFICATE_Interval_upper$",
r"test_solve_DualStatus_INFEASIBILITY_CERTIFICATE_LessThan$",
r"test_solve_DualStatus_INFEASIBILITY_CERTIFICATE_VariableIndex_LessThan$",
r"test_solve_DualStatus_INFEASIBILITY_CERTIFICATE_VariableIndex_LessThan_max$",
# Incorrect objective
# See https://github.com/jump-dev/MathOptInterface.jl/issues/1759
"test_unbounded_MIN_SENSE",
"test_unbounded_MIN_SENSE_offset",
"test_unbounded_MAX_SENSE",
"test_unbounded_MAX_SENSE_offset",
"test_infeasible_MAX_SENSE",
"test_infeasible_MAX_SENSE_offset",
"test_infeasible_MIN_SENSE",
"test_infeasible_MIN_SENSE_offset",
"test_infeasible_affine_MAX_SENSE",
"test_infeasible_affine_MAX_SENSE_offset",
"test_infeasible_affine_MIN_SENSE",
"test_infeasible_affine_MIN_SENSE_offset",
# TODO remove when PR merged
# See https://github.com/jump-dev/MathOptInterface.jl/pull/1769
"test_objective_ObjectiveFunction_blank",
# FIXME investigate
# Expression: isapprox(MOI.get(model, MOI.ObjectiveValue()), T(2), config)
# Evaluated: isapprox(5.999999984012059, 2.0, ...
"test_modification_delete_variables_in_a_batch",
r"test_unbounded_MIN_SENSE$",
r"test_unbounded_MIN_SENSE_offset$",
r"test_unbounded_MAX_SENSE$",
r"test_unbounded_MAX_SENSE_offset$",
r"test_infeasible_MAX_SENSE$",
r"test_infeasible_MAX_SENSE_offset$",
r"test_infeasible_MIN_SENSE$",
r"test_infeasible_MIN_SENSE_offset$",
r"test_infeasible_affine_MAX_SENSE$",
r"test_infeasible_affine_MAX_SENSE_offset$",
r"test_infeasible_affine_MIN_SENSE$",
r"test_infeasible_affine_MIN_SENSE_offset$",
# FIXME investigate
# Expression: isapprox(MOI.get(model, MOI.ObjectiveValue()), objective_value, config)
# Evaluated: isapprox(-2.1881334077988868e-7, 5.0, ...
"test_objective_qp_ObjectiveFunction_edge_case",
r"test_objective_qp_ObjectiveFunction_edge_case$",
# FIXME investigate
# Expression: isapprox(MOI.get(model, MOI.ObjectiveValue()), objective_value, config)
# Evaluated: isapprox(-2.1881334077988868e-7, 5.0, ...
"test_objective_qp_ObjectiveFunction_zero_ofdiag",
# FIXME investigate
# Expression: isapprox(MOI.get(model, MOI.ConstraintPrimal(), index), solution_value, config)
# Evaluated: isapprox(2.5058846553349667e-8, 1.0, ...
"test_variable_solve_with_lowerbound",
r"test_objective_qp_ObjectiveFunction_zero_ofdiag$",
# FIXME investigate
# See https://github.com/jump-dev/SDPA.jl/runs/7246518765?check_suite_focus=true#step:6:128
# Expression: ≈(MOI.get(model, MOI.ConstraintDual(), c), T[1, 0, 0, -1, 1, 0, -1, -1, 1] / T(3), config)
# Evaluated: ≈([0.3333333625488728, -0.16666659692134123, -0.16666659693012292, -0.16666659692134123, 0.33333336253987234, -0.16666659692112254, -0.16666659693012292, -0.16666659692112254, 0.333333362548654], [0.3333333333333333, 0.0, 0.0, -0.3333333333333333, 0.3333333333333333, 0.0, -0.3333333333333333, -0.3333333333333333, 0.3333333333333333]
"test_conic_PositiveSemidefiniteConeSquare_3",
r"test_conic_PositiveSemidefiniteConeSquare_3$",
],
)
return
Expand Down

0 comments on commit 0e4dff8

Please sign in to comment.