Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence test outputs #457

Merged
merged 2 commits into from
Feb 18, 2022
Merged

Silence test outputs #457

merged 2 commits into from
Feb 18, 2022

Conversation

simonbowly
Copy link
Collaborator

Continuing from #456

@codecov
Copy link

codecov bot commented Feb 18, 2022

Codecov Report

Merging #457 (24aafc9) into master (1648d6e) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #457      +/-   ##
==========================================
+ Coverage   59.22%   59.32%   +0.09%     
==========================================
  Files           8        8              
  Lines        3713     3717       +4     
==========================================
+ Hits         2199     2205       +6     
+ Misses       1514     1512       -2     
Impacted Files Coverage Δ
src/MOI_wrapper/MOI_wrapper.jl 88.88% <100.00%> (+0.02%) ⬆️
src/gen95/libgrb_api.jl 26.77% <0.00%> (+0.41%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1648d6e...24aafc9. Read the comment docs.

In MOI.empty(), set outputflag=0 before any other parameter
changes are made.
Set output_flag=0 for all environments used in the tests
@odow
Copy link
Member

odow commented Feb 18, 2022

I rebased because I saw this was a few commits behind master. But it looks like the prints are coming from

function test_MULTI_ENV_automatic_env()
model_1 = Gurobi.Optimizer()
model_2 = Gurobi.Optimizer()
@test model_1.env !== model_2.env
# Check that env is finalized with model when not supplied manually.
finalize(model_1)
@test model_1.env.ptr_env == C_NULL
return
end
function test_user_provided_env_empty()
model = Gurobi.Optimizer(GRB_ENV)
@test model.env === GRB_ENV
@test GRB_ENV.ptr_env != C_NULL
MOI.empty!(model)
@test model.env === GRB_ENV
@test GRB_ENV.ptr_env != C_NULL
return
end
function test_MULTI_ENV_automatic_env_empty()
model = Gurobi.Optimizer()
env = model.env
MOI.empty!(model)
@test model.env === env
@test env.ptr_env != C_NULL
return
end
function test_MULTI_ENV_manual_finalize()
env = Gurobi.Env()
model = Gurobi.Optimizer(env)
finalize(env)
@test env.finalize_called
finalize(model)
@test env.ptr_env == C_NULL
return
end

This creates new optimizers and doesn't set silent, so we're seeing the expected behavior.

@odow odow merged commit 4188473 into master Feb 18, 2022
@odow odow deleted the silent-env branch February 18, 2022 01:05
@odow
Copy link
Member

odow commented Feb 18, 2022

Thanks Simon.

@odow odow mentioned this pull request Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants