coin-or / pulp

A python Linear Programming API
http://coin-or.github.io/pulp/
Other
2.01k stars 376 forks source link

Test suite returns non-zero when running under Python3.12 #709

Closed tillea closed 6 months ago

tillea commented 7 months ago

Details for the issue

A bug was reported to the Debian packaged version of pulp which states the test suite does not return zero exit code and thus triggers a failure in our CI.

What did you do?

The bug report links to a full test log on some Ubuntu machine. You can also find the code of the test script inside the packaging Git.

What did you expect to see?

Since I can't see any failure inside the log I would expect a zero exit code. But maybe your inside to the test suite is better than mine (I'm not a user of pulp, just a random Debian maintainer of a package depending from pulp) and you might see some issue.

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

I'm using python version:

I installed PuLP via:

Tried to build the Debian package, running its CI test

Did you also

pchtsp commented 6 months ago

Hello. Thanks for letting us know. We were not testing with python 3.12 in CI. It seems that some of the solvers we test (highspy and xpress) do not have a 3.12 python version. I've taken them out from the github tests for now. Without those solvers, the package runs fine. Can you confirm?

tillea commented 6 months ago

Nilesh Patra has found some solution to fix the tests in Debian which is basically

--- a/debian/tests/run-unit-test
+++ b/debian/tests/run-unit-test
@@ -16,5 +16,5 @@ cd "$AUTOPKGTEST_TMP"
 pys="$(py3versions -s 2> /dev/null)"
 for py in $pys; do
        echo "=== $py ==="
-       $py -m unittest discover -v
+       $py -m unittest discover -v pulp/tests
 done