Skip to content

Commit

Permalink
az debug: using options instead of environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
fdabrandao committed Dec 28, 2023
1 parent 9a39da0 commit b9e9a7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions amplpy/tests/TestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
class TestBase(unittest.TestCase):
def setUp(self):
print("Method:", self._testMethodName)
os.environ["solver"] = "highs"
os.environ["highs_options"] = "outlev=1"
# os.environ["solver"] = "highs"
# os.environ["highs_options"] = "outlev=1"
self.ampl = amplpy.AMPL()
self.ampl["solver"] = "highs"
self.ampl["highs_options"] = "outlev=1"
self.dirpath = tempfile.mkdtemp()

def _tmpfile(self, filename):
Expand Down
2 changes: 2 additions & 0 deletions amplpy/tests/test_ampl.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ def test_solve_arguments(self):
ampl.option["highs_options"] = ""
self.assertEqual(ampl.option["highs_options"], "")

print(">>>", ampl.get_output("option highs_options;"))

output = ampl.solve(solver="highs", return_output=True)
print("output1:", output)
self.assertFalse("outlev" in output)
Expand Down

0 comments on commit b9e9a7d

Please sign in to comment.