Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed May 27, 2021
1 parent bc974bf commit a895ef6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Test/UnitTests/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ for attr in (
:Silent,
:SimplexIterations,
:SolverName,
:SolveTime,
:SolveTimeSec,
:TerminationStatus,
:TimeLimitSec,
)
Expand All @@ -162,6 +162,14 @@ for attr in (
MOI.optimize!(model)
end
T = MOI.attribute_value_type(attribute)
try
MOI.get(model, attribute)
catch err
if err isa ArgumentError
return # Solver does not support accessing the attribute.
end
end

@static if VERSION < v"1.5"
@test MOI.get(model, attribute) isa T
else
Expand Down

0 comments on commit a895ef6

Please sign in to comment.