Skip to content

Commit

Permalink
Adding Gurobi license checks in bigm and hull tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emma58 committed Oct 4, 2023
1 parent 98ad849 commit 4f1819b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pyomo/gdp/tests/test_bigm.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@

from io import StringIO

gurobi_available = SolverFactory('gurobi').available()
gurobi_available = (
SolverFactory('gurobi').available(exception_flag=False)
and SolverFactory('gurobi').license_is_valid()
)


class CommonTests:
Expand Down
5 changes: 4 additions & 1 deletion pyomo/gdp/tests/test_hull.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@
EPS = TransformationFactory('gdp.hull').CONFIG.EPS
linear_solvers = ct.linear_solvers

gurobi_available = SolverFactory('gurobi').available()
gurobi_available = (
SolverFactory('gurobi').available(exception_flag=False)
and SolverFactory('gurobi').license_is_valid()
)


class CommonTests:
Expand Down

0 comments on commit 4f1819b

Please sign in to comment.