From 96bfffa5223cc64182e9d8086b1782bd25493a68 Mon Sep 17 00:00:00 2001 From: pchtsp Date: Fri, 12 Jul 2024 10:39:07 +0200 Subject: [PATCH] more tests --- pulp/apis/__init__.py | 2 +- pulp/apis/copt_api.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pulp/apis/__init__.py b/pulp/apis/__init__.py index 41c3240f..5133a92a 100644 --- a/pulp/apis/__init__.py +++ b/pulp/apis/__init__.py @@ -151,7 +151,7 @@ def listSolvers(onlyAvailable=False): """ result = [] for s in _all_solvers: - solver = s() + solver = s(msg=False) if (not onlyAvailable) or solver.available(): result.append(solver.name) del solver diff --git a/pulp/apis/copt_api.py b/pulp/apis/copt_api.py index 71183480..9d55e30a 100644 --- a/pulp/apis/copt_api.py +++ b/pulp/apis/copt_api.py @@ -909,10 +909,10 @@ def __init__( else: # linux and mac should have /dev/null devnull = open("/dev/null", "w") - os.dup2(devnull.fileno(), 1) + os.dup2(devnull.fileno(), sys.stdout.fileno()) self.coptenv = coptpy.Envr() self.coptmdl = self.coptenv.createModel() - os.dup2(oldstdout_fno, 1) + os.dup2(oldstdout_fno, sys.stdout.fileno()) else: self.coptenv = coptpy.Envr() self.coptmdl = self.coptenv.createModel()