Skip to content

Commit 18b5a28

Browse files
committed
add hipo test
1 parent 5347d6f commit 18b5a28

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

cmake/python-highs.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ set(headers_python ${highs_headers_python}
1717
${basiclu_headers_python})
1818

1919
if(HIPO)
20-
set(sources_python ${sources}
20+
set(sources_python ${sources_python}
2121
${hipo_sources_python}
2222
${factor_highs_sources_python}
2323
${hipo_util_sources_python})
2424

25-
set(headers_python ${headers}
25+
set(headers_python ${headers_python}
2626
${hipo_headers_python}
2727
${factor_highs_headers_python}
2828
${hipo_util_headers_python})

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ wheel.packages = ["highs/highspy"]
5454
sdist.include = [
5555
"highs/highspy/highs.py",
5656
"highs/highspy/__init__.py",
57-
"highs/highspy/__init__.pyi",
57+
# "highs/highspy/__init__.pyi",
5858
# "highs/highspy/_core/*.pyi",
5959
"tests/test_highspy.py",
6060
"Version.txt",

tests/test_highspy.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,21 @@ def test_basics(self):
227227
self.assertEqual(status, highspy.HighsStatus.kOk)
228228
self.assertAlmostEqual(mip_node_count0, mip_node_count1)
229229

230+
def test_hipo(self):
231+
print("running hipo test")
232+
h = self.get_example_model()
233+
h.setOptionValue("solver", "hipo")
234+
h.setOptionValue("output_flag", True)
235+
236+
[status, output_flag] = h.getOptionValue("solver")
237+
self.assertEqual(output_flag, "hipo")
238+
239+
h.run()
240+
self.assertEqual(status, highspy.HighsStatus.kOk)
241+
242+
status = h.getModelStatus()
243+
self.assertEqual(status, highspy.HighsModelStatus.kOptimal)
244+
230245
def test_example(self):
231246
h = self.get_example_model()
232247
lp = h.getLp()

0 commit comments

Comments
 (0)