diff --git a/pulp/tests/test_pulp.py b/pulp/tests/test_pulp.py index d36fcae5..d74d66ed 100644 --- a/pulp/tests/test_pulp.py +++ b/pulp/tests/test_pulp.py @@ -45,11 +45,14 @@ def gurobi_test(test_item): @functools.wraps(test_item) - def skip_wrapper(*args, **kwargs): + def skip_wrapper(test_obj, *args, **kwargs): + if not test_obj.solver.name in ["GUROBI", "GUROBI_CMD"]: + # if we're not testing gurobi, we do not care on the licence + return test_item(test_obj, *args, **kwargs) if gp is None: raise unittest.SkipTest("No gurobipy, can't check license") try: - test_item(*args, **kwargs) + return test_item(*args, **kwargs) except gp.GurobiError as ge: # Skip the test if the failure was due to licensing if ge.errno == gp.GRB.Error.SIZE_LIMIT_EXCEEDED: