From f93cfbf94c494d20ccd4448b27c742c3c22e9a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leduin=20Jos=C3=A9=20Cuenca=20Macas?= Date: Tue, 26 Aug 2025 22:53:15 +0200 Subject: [PATCH] Check if the solution variables content is not None before doing operations with integers --- pulp/tests/test_pulp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulp/tests/test_pulp.py b/pulp/tests/test_pulp.py index a0782104..ab72dfa3 100644 --- a/pulp/tests/test_pulp.py +++ b/pulp/tests/test_pulp.py @@ -2410,7 +2410,7 @@ def pulpTestCheck( ) if sol is not None: for v, x in sol.items(): - if abs(v.varValue - x) > eps: + if v.varValue is not None and abs(v.varValue - x) > eps: dumpTestProblem(prob) raise PulpError( "Tests failed for solver {}:\nvar {} == {} != {}".format(