Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Mar 1, 2022
1 parent 5afb0c6 commit 595de75
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: MOI#bl/throw_unsupported_uf
shell: julia --project=@. {0}
run: |
using Pkg
Pkg.add(PackageSpec(name="MathOptInterface", rev="bl/throw_unsupported_uf"))
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
Expand Down
1 change: 1 addition & 0 deletions src/MOI_wrapper/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ function MOI.copy_to(
dest::Optimizer,
src::MOI.Utilities.UniversalFallback{OptimizerCache},
)
MOI.Utilities.throw_unsupported(src)
return MOI.copy_to(dest, src.model)
end

Expand Down
5 changes: 5 additions & 0 deletions test/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ function test_runtests()
MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()),
MOI.instantiate(Clp.Optimizer; with_bridge_type = Float64),
)
# `Variable.ZerosBridge` makes dual needed by some tests fail.
MOI.Bridges.remove_bridge(
model.optimizer,
MathOptInterface.Bridges.Variable.ZerosBridge{Float64},
)
MOI.set(model, MOI.Silent(), true)
MOI.Test.runtests(
model,
Expand Down

0 comments on commit 595de75

Please sign in to comment.