diff --git a/app/test/test_example.py b/app/test/test_example.py index 35ec4b6..51198ee 100644 --- a/app/test/test_example.py +++ b/app/test/test_example.py @@ -33,6 +33,7 @@ def yosh_loop(): iif_target = 0.5 tif_target = 0.9 item_vars = LpVariable.dicts("Item", Items, cat="Binary") + result = 'Infeasible' while drift <= drift_limit: prob = LpProblem("tif_tcc_test", LpMinimize) @@ -53,8 +54,13 @@ def yosh_loop(): else: for v in prob.variables(): print(v.name, "=", v.varValue) + + result = LpStatus[prob.status] break + return result + + def test_solver(): print(yosh_loop()) - assert yosh_loop() == 'Solved' + assert yosh_loop() == 'Optimal'