Testing code that is executed when solve reaches non-optimal status

Look at MockOptimizer in MOI and how it’s used in JuMP:
https://github.com/jump-dev/MathOptInterface.jl/blob/master/src/Utilities/mockoptimizer.jl
https://github.com/jump-dev/JuMP.jl/blob/eaa22fa5d01d43046192dfd225c0335884974658/test/generate_and_solve.jl#L51

1 Like