Skip to content

Commit

Permalink
Skip solve test if highs is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
fdabrandao committed Dec 29, 2023
1 parent 5933d5f commit 6923182
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion amplpy/tests/test_ampl.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import shutil
import os

import amplpy
Expand Down Expand Up @@ -383,6 +384,8 @@ def test_write(self):
ampl.write("bmod", "rc")

def test_solve_arguments(self):
if shutil.which("highs") is None:
self.skipTest("highs not available")
ampl = self.ampl
ampl.eval(
"""
Expand All @@ -395,7 +398,6 @@ def test_solve_arguments(self):
)
ampl.param["n"] = 5
ampl.option["highs_options"] = ""
ampl.option["HIGHS_OPTIONS"] = ""
self.assertEqual(ampl.option["highs_options"], "")

output = ampl.solve(solver="highs", return_output=True)
Expand Down

0 comments on commit 6923182

Please sign in to comment.